Cocoapods找不到pod Firebase的兼容版本

问题描述 投票:4回答:1

我刚从Windows 10切换到Mac。我已经发布了我的Flutter应用程序的Android版本。现在我正在研究我的Flutter应用程序的IOS版本。当我尝试在Mac上运行我的应用程序时,我遇到了错误。

[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
  cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
  Firebase/Core
  mlkit (from `.symlinks/plugins/mlkit/ios`) was resolved to 0.8.3, which depends on
  Firebase/Core (~> 5.11.0)

  CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
  firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 0.0.1, which depends on
  Firebase/Auth (~> 5.19) was resolved to 5.19.0, which depends on
  Firebase/CoreOnly (= 5.19.0)

  mlkit (from `.symlinks/plugins/mlkit/ios`) was resolved to 0.8.3, which depends on
  Firebase/Core (~> 5.11.0) was resolved to 5.11.0, which depends on
  Firebase/CoreOnly (= 5.11.0)

  CocoaPods could not find compatible versions for pod "FirebaseCore":
  In Podfile:
  mlkit (from `.symlinks/plugins/mlkit/ios`) was resolved to 0.8.3, which depends on
  Firebase/Core (~> 5.11.0) was resolved to 5.11.0, which depends on
  Firebase/CoreOnly (= 5.11.0) was resolved to 5.11.0, which depends on
  FirebaseCore (= 5.1.6)

  mlkit (from `.symlinks/plugins/mlkit/ios`) was resolved to 0.8.3, which depends on
  Firebase/Core (~> 5.11.0) was resolved to 5.11.0, which depends on
  FirebaseAnalytics (= 5.3.0) was resolved to 5.3.0, which depends on
  FirebaseCore (~> 5.1)
flutter cocoapods
1个回答
6
投票

我通过运行手动'pod update'和Flutter'Packages get'来解决这个问题...

在终端更改目录中:

cd FLUTTER_PROJECT_FOLDER_PATH/ios

运行pod更新:

pod update

运行Flutter Packages得到

// In Android Studio, open 'pub spec.yaml', press 'Packages get' 
  • 然后你应该能够构建到iOS
  • 第一次构建确实需要比正常时间长3分钟,但在后续构建时恢复正常。
© www.soinside.com 2019 - 2024. All rights reserved.