ARTICLE

记一次flutter 报错:CocoaPods could not find compatible versions for pod

Original Artikel
Erklärung: Der Autor erklärt, dass dieses Artikel ursprünglich ist, ohne Zustimmung des Autors, nicht neu veröffentlicht, wenn neu veröffentlicht wird, muss diese Website anzeigen, und die Plattform behält sich das Recht vor, die gesetzliche Verantwortung für Verstöße zu verfolgen.

[!] 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 Copy
pod install --repo-update --verbose

这样就可以了

Schreiben Sie Ihre Gedanken
Meinungen zu teilen, freundliche Kommunikation
Bitte bleiben Sie freundlich und vernünftig diskutiert
0 Worte

Keine Kommentare, erstmals kommentieren.