![](/img/trans.png)
[英]Flutter integration with Firebase error on IOS (can't install pod)
[英]Flutter pod install error with firebase messaging on ios
在 ios flutter 應用程序文件夾上運行時無法執行命令“pod install”。
報錯如下:
分析依賴關系 firebase_core:使用 Firebase SDK 版本“10.0.6”在“firebase_core”中定義
[:] CocoaPods 找不到 pod“Firebase/Messaging”的兼容版本:在 Podfile 中:firebase_messaging(來自.symlinks/plugins/firebase_messaging/ios
)被解析為 10.0.6,這取決於 Firebase/Messaging(= 10.0.6) )
您的規范來源均不包含滿足依賴項的規范: Firebase/Messaging (= 10.0.6)
。
你有:
pod repo update
或pod install --repo-update
的過時源代碼庫。我們在 pubspec.yaml 上有這個 package
firebase_core: ^1.6.0
firebase_messaging: ^10.0.6
在播客文件上:
platform :ios, '10.0'
我們使用 pod 版本:
1.11.0.rc.1
macOS Big Sur 版本:
11.2.1
如果我們從 pubspec.yaml 中刪除這個包,pod install 工作正常。
我們試了很多方法都沒有用!
始終當您添加對 IOS 的新依賴項時,您應該這樣做:
cd ios/
rm -rf Pods/
rm -rf Podfile.lock
cd ..
flutter clean
flutter pub get
cd ios
pod install
pod install --repo-update ( if needed)
這總是幫助我解決 IOS 上的依賴問題
使用此命令解決了問題
flutter pub cache repair
感謝你所做的一切!
如果有人在這里顯示,我通過在iOS目錄中運行pod update命令來修復此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.