Cocapods找不到Pod Firebase的兼容版本

Sam*_*Sam 5 cocoapods flutter

我刚刚从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
Run Code Online (Sandbox Code Playgroud)
  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)
Run Code Online (Sandbox Code Playgroud)

Luk*_*yer 6

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

在终端中将目录更改为:

cd FLUTTER_PROJECT_FOLDER_PATH/ios
Run Code Online (Sandbox Code Playgroud)

运行pod更新:

pod update
Run Code Online (Sandbox Code Playgroud)

运行Flutter Packages获取

// In Android Studio, open 'pub spec.yaml', press 'Packages get' 
Run Code Online (Sandbox Code Playgroud)
  • 然后您应该可以构建到iOS

  • 第一次构建的确比正常时间多了约3分钟,但随后的构建又恢复了正常。

  • 我试图从ios文件夹中运行pod更新,但是它显示相同的错误。...[!] CocoaPods找不到Pod“ Firebase / Core”的兼容版本:在Podfile中:cloud_firestore(来自`.symlinks / plugins / cloud_firestore / ios`)解析为0.0.1,具体取决于Firebase / Core (2认同)