CocoaPods无法找到pod“Firebase/Database”的兼容版本[Geofire问题]

np8igboo  于 2022-11-17  发布在  其他
关注(0)|答案(3)|浏览(122)

由于Firebase插件的不断更新,我遇到了cocopod错误,这个错误到底是什么,我该如何解决这个错误?我以前有过一个并解决了它,但随着更新的包和旧的插件,这个错误不断弹出。

Analyzing dependencies
Pre-downloading: `GeoFire` from `https://github.com/jesussmile/geofire-objc.git`
firebase_auth: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
  In Podfile:
    GeoFire (from `https://github.com/jesussmile/geofire-objc.git`) was resolved to 4.3.0, which depends on
      GeoFire/Database (= 4.3.0) was resolved to 4.3.0, which depends on
        Firebase/Database (= 9.3.0)

    firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 10.0.3, which depends on
      Firebase/Database (= 10.0.0)
kdfy810k

kdfy810k1#

尝试pod clean。用于清除pod文件和缓存。
使用pod install安装pod文件。

62o28rlo

62o28rlo2#

1.只要删除pubspec.lock,整个ios/Pods文件夹,ios/Podfile.lock文件。
1.运行flutter pub get
1.通过端子cd ios
1.如果您不是silicon mac(M1、M1Pro、M1X)用户pod install,或者如果它显示错误,则运行pod install --repo-update,因为它也将在错误消息中显示。
1.如果你是silicon mac用户,那么你只需要用前缀arch -x86_64执行第4行命令,那么它们就是arch -x86_64 pod installarch -x86_64 pod install --repo-update

ne5o7dgx

ne5o7dgx3#

我制作了一个geofire-objc存储库的副本,然后在文件GeoFire.podspec中将db.ios.dependency 'Firebase/Database', '10.0.3'更改为我正在使用的firebase数据库版本,在本例中为10.0.3。现在它工作正常。

相关问题