记一次flutter 报错:CocoaPods could not find compatible versions for pod
一路向北
风是自由的,我也是
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In snapshot (Podfile.lock):
Firebase/Auth (= 11.8.0)In Podfile:
firebase_auth (from.symlinks/plugins/firebase_auth/ios) was resolved to 5.6.2, which depends on
Firebase/Auth (= 11.15.0)Specs satisfying the
Firebase/Auth (= 11.8.0), Firebase/Auth (= 11.15.0)dependency were found, but they required a higher minimum deployment target.
以上的问题是在flutter for ios的工程中,加入flutter crashlytics这个库时出现的报错,原因是当前本地的cocoapods中没有Firebase/Auth的11.15.0版本的spec,所以需要我们升级。
这个问题在flutter pub get或者flutter add xxx时没有出现,但是在编译到iOS设备中时会出现。
所以一般我会在flutter pub get后,再cd到iOS目录中执行pod install

解决上面截图中的办法就是要更新本地cocoapods spec:
terminal
pod install --repo-update --verbose
这样就可以了
发布于2025-07-21 02:52:00
浏览量9·
暂无评论,快来发表第一条评论吧