CocoaPods找不到Pod“FirebaseCore”的兼容版本:运行flutter iOS build的pod install时出错

hgqdbh6s  于 2023-04-22  发布在  Flutter
关注(0)|答案(4)|浏览(270)

我在flutter for iOS上使用最新的firebase_core sdk运行“pod install”时出现以下错误。我清除了Pod,symlinks文件夹并删除了Podfile.lock文件,然后运行pod install,但结果与下面相同。这里的问题是什么?

  1. Analyzing dependencies
  2. cloud_firestore: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  3. firebase_auth: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  4. firebase_core: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  5. Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
  6. firebase_crashlytics: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  7. firebase_dynamic_links: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  8. firebase_messaging: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  9. firebase_storage: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
  10. **[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
  11. In Podfile:
  12. firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.19.2, which depends on
  13. Firebase/CoreOnly (= 9.2.0) was resolved to 9.2.0, which depends on
  14. FirebaseCore (= 9.2.0)
  15. firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) was resolved to 10.3.2, which depends on
  16. Firebase/Storage (= 9.2.0) was resolved to 9.2.0, which depends on
  17. FirebaseStorage (~> 9.2.0) was resolved to 9.2.0, which depends on
  18. FirebaseCore (~> 9.0)
  19. google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
  20. GoogleMLKit/LinkFirebase (~> 2.2.0) was resolved to 2.2.0, which depends on
  21. MLKitLinkFirebase (~> 1.3.0) was resolved to 1.3.0, which depends on
  22. FirebaseCore (~> 8.0)
  23. CocoaPods could not find compatible versions for pod "MLKitVision":
  24. In Podfile:
  25. google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
  26. GoogleMLKit/ImageLabeling (~> 2.2.0) was resolved to 2.2.0, which depends on
  27. MLKitImageLabeling (~> 1.3.0) was resolved to 1.3.0, which depends on
  28. MLKitVision (~> 1.3)
  29. google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
  30. GoogleMLKit/PoseDetection (~> 2.2.0) was resolved to 2.2.0, which depends on
  31. MLKitPoseDetection (~> 1.0.0-beta4) was resolved to 1.0.0-beta6, which depends on
  32. MLKitXenoCommon (= 1.0.0-beta6) was resolved to 1.0.0-beta6, which depends on
  33. MLKitVision (~> 2.0)**
mrwjdhj3

mrwjdhj31#

安装干净:

  1. sudo gem install cocoapods-clean

在项目的文件夹中运行disintegrate:

  1. pod deintegrate

修改你的podfile(删除你不想再使用的pods所在的行),然后运行:

  1. pod install
  2. pod update
wi3ka0sx

wi3ka0sx2#

就这么做:

  1. pod repo update && pod install --repo-update
kx1ctssn

kx1ctssn3#

删除Pods文件夹、.symlinks文件夹和Podfile.lock。然后运行pod install并重试

vwkv1x7d

vwkv1x7d4#

Flutter mlkit插件不支持Firebase版本10,因此您需要降级。
兼容的依赖项:

  1. google_mlkit_text_recognition: ^0.5.0
  2. firebase_core: ^1.24.0
  3. firebase_analytics: ^9.1.5
  4. cloud_firestore: ^3.5.1
  5. firebase_crashlytics: ^2.9.0
  6. firebase_auth: ^3.11.2
  7. dependency_overrides:
  8. firebase_core_platform_interface: 4.5.1

将此添加到Podfile顶部

  1. $FirebaseSDKVersion = '9.6.0'

相关问题