简体   繁体   English

Flutter 中的 Firebase cloud_firestore 版本问题 - iOs M1

[英]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.

相关问题 Flutter (iOS) - 在 GeneratedPluginRegistrant.m 中找不到模块“cloud_firestore” - Flutter (iOS) - Module 'cloud_firestore' not found in GeneratedPluginRegistrant.m Flutter iOS Cloud_FireStore提供错误 - Flutter ios cloud_firestore giving errors Flutter on IOS:致命错误:找不到模块“cloud_firestore” - Flutter on IOS: fatal error: module 'cloud_firestore' not found Flutter 不会在 M1 Mac 上使用 Firebase 构建在 iOS 上 - Flutter will not build on iOS with Firebase on M1 Mac Flutter 带有“cloud_firestore”的 pod 安装错误 - Flutter pod install error with 'cloud_firestore' CocoaPods 找不到 pod“Firebase/Core”的兼容版本 | cloud_firestore,Flutter - CocoaPods could not find compatible versions for pod "Firebase/Core” | cloud_firestore, Flutter 将 cloud_firestore 添加到 pubspec Flutter 后,无法为模拟器构建应用程序 - Could not build the application for the simulator after adding cloud_firestore to pubspec Flutter 致命错误:找不到模块“cloud_firestore” - fatal error: module 'cloud_firestore' not found Flutter iOS Z1BDF 上的应用程序605991920DB11CBDF8508204C4EBZ 在 M1 Mac 上运行的模拟器 - Flutter iOS App on an iOS Simulator running on an M1 Mac 无法在 MacBook M1 中使用 Firebase 运行 Flutter 项目 - Cannot run the Flutter project with Firebase in MacBook M1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM