我有Flutter应用程序,可以在iOS上运行和构建,核心是Flutter + Firebase,但我无法安装包和构建项目.

  sdk: ">=2.16.1 <3.0.0"
....
  cloud_firestore: ^4.15.9
  cloud_functions: ^4.6.9
  firebase_auth: ^4.17.9
  firebase_core: ^2.27.1
  firebase_crashlytics: ^3.4.19
  firebase_messaging: ^14.7.20
  firebase_performance: ^0.9.3+18
  firebase_storage: ^11.6.10
ruby -v
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [arm64-darwin23]
pod --version
1.15.2
M1 chip

安装:

pod install
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.17.9, which depends on
      Firebase/Auth (= 10.22.0) was resolved to 10.22.0, which depends on
        FirebaseAuth (~> 10.22.0) was resolved to 10.22.0, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 2.1)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.0) was resolved to 7.0.0, which depends on
        GTMAppAuth (< 3.0, >= 1.3) was resolved to 2.0.0, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 1.5)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.0) was resolved to 7.0.0, which depends on
        GTMSessionFetcher/Core (< 4.0, >= 1.1)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 3.2.0) was resolved to 3.2.0, which depends on
        MLKitBarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
          MLKitVision (~> 4.2) was resolved to 4.2.0, which depends on
            GTMSessionFetcher/Core (~> 1.1)

CocoaPods could not find compatible versions for pod "nanopb":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.15.9, which depends on
      nanopb (< 2.30910.0, >= 2.30908.0)

    firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) was resolved to 3.4.19, which depends on
      Firebase/Crashlytics (= 10.22.0) was resolved to 10.22.0, which depends on
        FirebaseCrashlytics (~> 10.22.0) was resolved to 10.22.0, which depends on
          nanopb (< 2.30911.0, >= 2.30908.0)

如果我try 将Firebase SDK降级到$Firebase SDKVersion=‘9.6.0’,可以工作,但构建有很多其他构建失败.

推荐答案

更新或删除mobile_scanner.

日志(log)表明GTMSessionFetcher 1.x中有mobile_scanner个锁,这与FirebaseAuth 10.22.0不兼容,至少需要GTMSessionFetcher 2.1.

Ios相关问答推荐

UIImage大小调整工作,但转换为上传数据时恢复到原始大小

如何在SwiftUI ScrollView中zoom 中心项目?

更改文本在Flutter 中的位置

SwiftUI Divider过大了其父视图

SWIFT-仅解码感兴趣的元素

Swift locationManager.requestWhenInUseAuthorization() 不提示用户

从包含 5 个以上项目的自定义选项卡栏的导航视图中删除更多按钮

垂直分页 UIScrollView 高度不正确

为什么这个 SwiftUI 状态在作为非绑定参数传递时没有更新?

无法在 CollectionView 中禁用部分弹跳 - 组合布局

iOS - 判断开发者模式是否开启 (Swift)

SwiftUI:如何为 ScrollView 制作可拉伸(灵活)的粘性标题?

如何识别 SwiftUI 中点击的按钮 ID 以使该按钮动画化?

在使用 Github Actions 时,我面临权限被拒绝错误

iOS:应用程序在安装应用程序时未征求用户许可.每次都获得 kCLAuthorizationStatusNotDetermined - Objective-c & Swift

是否可以在 iOS 9 上让您的 iPad 应用退出多任务处理?

如何更改uitableview删除按钮文本

快速从 NSTimeInterval 转换为小时、分钟、秒、毫秒

值/对象的 NSDictionary 键?

类 AMSupportURLConnectionDelegate 在两者中都实现