您的规范源均不包含满足依赖项的规范:Firebase (~> 6.33.0)、Firebase (= 6.33.0, ~> 6.33.0)

问题描述 投票:0回答:6

我正在将一些 Firebase SDK 实现到我的 pod 中,但我在对它们进行版本控制时遇到问题。我想设置 Firebase 6.33。我确实检查了这个版本的 pod 规格并根据该规格更新了我的 pod。

pod 'Firebase', '~> 6.33.0'
pod 'FirebaseCore', '~> 6.10.3'
pod 'FirebasePerformance', '~> 3.3.0'
pod 'FirebaseRemoteConfig', '~> 4.9.0'
pod 'FirebaseAnalytics', '~> 6.8.3'
pod 'FirebaseCrashlytics', '~> 4.6.1'

当我使用上面的代码时,它在詹金斯上给了我这个错误:

您的规范源都不包含满足依赖关系的规范: Firebase (~> 6.33.0)、Firebase (= 6.33.0、~> 6.33.0)。

我首先执行了

pod deintegrate
pod install
进行全新安装。它在我的 MacBook 上没有给出错误,但在 jenkins 上却给出了错误。

podspec.json:https://github.com/CocoaPods/Specs/blob/master/Specs/0/3/5/Firebase/6.33.0/Firebase.podspec.json

ios firebase cocoapods
6个回答
64
投票

Apple M1 用户👇

在您的 ios 文件夹内,在终端中按照以下命令操作

sudo arch -x86_64 gem install ffi

arch -x86_64 pod install

如果不起作用试试这个

arch -x86_64 pod install --repo-update

Apple Intel 用户👇

pod install --repo-update

41
投票

pod install --repo-update

更新到最近发布的 CocoaPods pod。


11
投票

对于那些拥有 Mac M1 的人,尝试在 VSCode 终端中运行

pod install --repo-update
但没有成功,我找到的解决方案是:

  • 在应用程序上找到本机终端
  • 确保它正在与 Rosetta 一起运行(右键单击终端 > 获取信息 > 检查使用 Rosetta 打开)
  • 打开终端
  • cd path_to_your_ios_folder
    并运行
    pod install --repo-update
    。那应该有效!

我正在使用:

Pod: 1.11.0
firebase_core: ^1.6.0
firebase_crashlytics: ^2.2.1
firebase_analytics: ^8.3.1
firebase_messaging: ^10.0.6
flutter: 2.2.3

1
投票

这对我有用

rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install

0
投票

为什么指定所有不同版本的 firebase?对我来说,我有三个不同的 Firebase 相关插件(Analytics / Dynamiclinks / Firebasex)。其中每个都有不同的源试图从中获取(一些 v 7.0.0 和一些 v 6.33.0)。我进入 podfile 并将所有版本更改为 6.33.0,然后就可以构建了。


0
投票

最近确实存在问题。 No meu caso, estava com as seguintes versões no meu package.json:

"@react-native-firebase/app": "19.0.1",
"@react-native-firebase/auth": "19.0.1",

E recebendo essa reposta ao dar pod install:

[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
  In Podfile:
    RNFBAuth (from `../node_modules/@react-native-firebase/auth`) was resolved to 19.0.1, which depends on
      Firebase/Auth (= 10.22.0)

None of your spec sources contain a spec satisfying the dependency: `Firebase/Auth (= 10.22.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

继续执行 React-native-Firebase 文档。继续错误。 Então peguei pra testar as versões anteriores.

Mudei a versão de ambas as libs que mencionei anteriormente para:

"@react-native-firebase/app": "14.12.0",
"@react-native-firebase/auth": "14.12.0",

E ao rodar 纱线 e pod 安装新功能以用作 esperado。 Bem chato isso,dps testo novamente pra tentar entender o motivo desse erro com a versão mais estável.

obs:o comando pod repo update não estava funcionando pra mim por algum motivo do meu pc

© www.soinside.com 2019 - 2024. All rights reserved.