簡體   English   中英

CocoaPods 找不到 pod“FirebaseCore”的兼容版本:為 flutter iOS 構建運行 pod 安裝時出錯

[英]CocoaPods could not find compatible versions for pod "FirebaseCore" : error on running pod install for flutter iOS build

我在使用最新的 firebase_core sdk 在 flutter 上為 iOS 運行“pod install”時遇到以下錯誤。我清除了 Pod、符號鏈接文件夾並刪除了 Podfile.lock 文件,並運行了 pod install,但結果與以下。 這里的問題是什么?

Analyzing dependencies
cloud_firestore: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
firebase_dynamic_links: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '9.2.0' defined in 'firebase_core'
**[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
  In Podfile:
    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.19.2, which depends on
      Firebase/CoreOnly (= 9.2.0) was resolved to 9.2.0, which depends on
        FirebaseCore (= 9.2.0)

    firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) was resolved to 10.3.2, which depends on
      Firebase/Storage (= 9.2.0) was resolved to 9.2.0, which depends on
        FirebaseStorage (~> 9.2.0) was resolved to 9.2.0, which depends on
          FirebaseCore (~> 9.0)

    google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
      GoogleMLKit/LinkFirebase (~> 2.2.0) was resolved to 2.2.0, which depends on
        MLKitLinkFirebase (~> 1.3.0) was resolved to 1.3.0, which depends on
          FirebaseCore (~> 8.0)

CocoaPods could not find compatible versions for pod "MLKitVision":
  In Podfile:
    google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
      GoogleMLKit/ImageLabeling (~> 2.2.0) was resolved to 2.2.0, which depends on
        MLKitImageLabeling (~> 1.3.0) was resolved to 1.3.0, which depends on
          MLKitVision (~> 1.3)

    google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
      GoogleMLKit/PoseDetection (~> 2.2.0) was resolved to 2.2.0, which depends on
        MLKitPoseDetection (~> 1.0.0-beta4) was resolved to 1.0.0-beta6, which depends on
          MLKitXenoCommon (= 1.0.0-beta6) was resolved to 1.0.0-beta6, which depends on
            MLKitVision (~> 2.0)**

刪除 Pods 文件夾、.symlinks 文件夾和 Podfile.lock。 然后運行 ​​pod install 並重試

安裝干凈:

sudo gem install cocoapods-clean

在項目的文件夾中運行 deintegrate:

pod deintegrate

修改您的 podfile(刪除您不想再使用的 pod 的行)並運行:

pod install

pod update

去做就對了:

pod repo update && pod install --repo-update

您可以參考以下鏈接: https://github.com/googleads/googleads-mobile-flutter/issues/594 https://github.com/firebase/flutterfire/issues/9152

我在文件pubspec.yaml中更改了它並解決了我的問題

google_mobile_ads:
git:
  url: https://github.com/googleads/googleads-mobile-flutter
  ref: 356875362ddb2ac2e0056385d2729c093722fb8d
  path: packages/google_mobile_ads

這是我的最終文件

#  google_mobile_ads: ^1.3.0
  google_mobile_ads:
    git:
      url: https://github.com/googleads/googleads-mobile-flutter
      ref: 356875362ddb2ac2e0056385d2729c093722fb8d
      path: packages/google_mobile_ads
#  firebase_core:  ^1.20.0
  firebase_core:  ^1.18.0
#  firebase_analytics: ^9.3.0
  firebase_analytics: ^9.1.10

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM