由于Firebase插件的不断更新,我遇到了cocopod错误,这个错误到底是什么,我该如何解决这个错误?我以前有过一个并解决了它,但随着更新的包和旧的插件,这个错误不断弹出。
Analyzing dependencies
Pre-downloading: `GeoFire` from `https://github.com/jesussmile/geofire-objc.git`
firebase_auth: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
GeoFire (from `https://github.com/jesussmile/geofire-objc.git`) was resolved to 4.3.0, which depends on
GeoFire/Database (= 4.3.0) was resolved to 4.3.0, which depends on
Firebase/Database (= 9.3.0)
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 10.0.3, which depends on
Firebase/Database (= 10.0.0)
3条答案
按热度按时间kdfy810k1#
尝试
pod clean
。用于清除pod文件和缓存。使用
pod install
安装pod文件。62o28rlo2#
1.只要删除
pubspec.lock
,整个ios/Pods
文件夹,ios/Podfile.lock
文件。1.运行
flutter pub get
1.通过端子
cd ios
1.如果您不是silicon mac(M1、M1Pro、M1X)用户
pod install
,或者如果它显示错误,则运行pod install --repo-update
,因为它也将在错误消息中显示。1.如果你是silicon mac用户,那么你只需要用前缀
arch -x86_64
执行第4行命令,那么它们就是arch -x86_64 pod install
或arch -x86_64 pod install --repo-update
ne5o7dgx3#
我制作了一个
geofire-objc
存储库的副本,然后在文件GeoFire.podspec
中将db.ios.dependency 'Firebase/Database', '10.0.3'
更改为我正在使用的firebase数据库版本,在本例中为10.0.3。现在它工作正常。