[英]Firebase cloud_firestore version issue in Flutter - iOs M1
I've been trying to run my flutter project in iOs emulator iPhone 12. But, the version dependancy issue haven't been resolved by any answer or suggestion I've found over StackOverflow or Github.我一直在尝试在 iOs 模拟器 iPhone 12 中运行我的 flutter 项目。但是,我在 StackOverflow 或 Github 上找到的任何答案或建议都没有解决版本依赖性问题。
The issue I'm facing is:我面临的问题是:
[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.5.3, which depends on
Firebase/Firestore (= 8.7.0) was resolved to 8.7.0, which depends on
FirebaseFirestore (~> 8.7.0) was resolved to 8.7.0, which depends on
FirebaseCore (~> 8.0)
firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.7.0, which depends on
Firebase/CoreOnly (= 8.7.0) was resolved to 8.7.0, which depends on
FirebaseCore (= 8.7.0)
CocoaPods could not find compatible versions for pod "nanopb":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.5.3, which depends on
Firebase/Firestore (= 8.7.0) was resolved to 8.7.0, which depends on
FirebaseFirestore (~> 8.7.0) was resolved to 8.7.0, which depends on
nanopb (~> 2.30908.0)
firebase_admob (from `.symlinks/plugins/firebase_admob/ios`) was resolved to 0.11.2, which depends on
Google-Mobile-Ads-SDK (= 7.49.0) was resolved to 7.49.0, which depends on
GoogleAppMeasurement (~> 6.0) was resolved to 6.1.2, which depends on
nanopb (~> 0.3)
Pubsec.yaml file: pubsec.yaml 文件:
version: 3.0.5+11
environment:
sdk: ">=2.10.5 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.13.0+1 #^2.2.1 #^0.14.3 #https://pub.dev/packages/cloud_firestore
firebase_auth: ^1.0.0 #https://pub.dev/packages/firebase_auth
firebase_auth_web: ^1.0.0 #https://pub.dev/packages/firebase_auth_web/
firebase_core: ^1.2.1 #https://pub.dev/packages/firebase_core
firebase_messaging: ^9.0.0 #^10.0.1 #^7.0.3 #https://pub.dev/packages/firebase_messaging
firebase_storage: ^8.1.1 #https://pub.dev/packages/firebase_storage
# flutter_html: ^2.1.0 #https://pub.dev/packages/flutter_html
# flutter_widget_from_html: ^0.8.2
google_sign_in: ^5.0.0 #^4.5.6 #https://pub.dev/packages/google_sign_in
# firebase_analytics: ^7.1.0 #https://pub.dev/packages/firebase_analytics
firebase_admob: ^0.11.2 #https://pub.dev/packages/firebase_admob
I've tried some versions of cloud_firestore
from FlutterFire's GitHub issues.我已经从 FlutterFire 的 GitHub 问题中尝试了一些版本的cloud_firestore
。 The issue persists when I run the command pod update
and the command flutter pub get
works fine.当我运行命令pod update
并且命令flutter pub get
工作正常时,问题仍然存在。 The device is MacBook Pro M1 and I've also installed the ffi
from this answer .该设备是 MacBook Pro M1,我还从这个答案安装了ffi
。 But, the project doesn't run on the iOs emulator.但是,该项目不能在 iOs 模拟器上运行。
You can try the following:您可以尝试以下操作:
Firstly, in your Podfile
change the platform :ios
target from 9.0
to 10.0
.首先,在您的Podfile
中将platform :ios
目标从9.0
更改为10.0
。
Then, you can try to run the arch -x86_64 pod update
command line.然后,您可以尝试运行arch -x86_64 pod update
命令行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.