目前,我正在try 用最新版本在我的Ffltter项目中添加firebase_core: ^0.5.0+1firebase_crashlytics: ^0.2.1+1个软件包,它在Android下工作没有任何问题,但在iOS下,它不能工作,并给出错误.那么现在如何使用iOS Ffltter项目中的最新软件包来运行我的项目呢?

我也试着调到pod repo update,但还是不行

我在flutter run上看到这个错误

CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Finding Podfile changes
      A firebase_crashlytics
      - Flutter
      - contact_picker
      - device_info
      - file_picker
      - firebase_auth
      - firebase_core
      - firebase_messaging
      - flutter_keyboard_visibility
      - flutter_local_notifications
      - flutter_webview_plugin
      - image_picker
      - path_provider
      - phone_number
      - share
      - shared_preferences
      - sqflite
      - url_launcher

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `contact_picker` from `.symlinks/plugins/contact_picker/ios`
    -> Fetching podspec for `device_info` from `.symlinks/plugins/device_info/ios`
    -> Fetching podspec for `file_picker` from `.symlinks/plugins/file_picker/ios`
    -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
    firebase_auth: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
    firebase_core: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_crashlytics` from `.symlinks/plugins/firebase_crashlytics/ios`
    firebase_crashlytics: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
    firebase_messaging: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
    -> Fetching podspec for `flutter_keyboard_visibility` from `.symlinks/plugins/flutter_keyboard_visibility/ios`
    -> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
    -> Fetching podspec for `flutter_webview_plugin` from `.symlinks/plugins/flutter_webview_plugin/ios`
    -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
    -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
    -> Fetching podspec for `phone_number` from `.symlinks/plugins/phone_number/ios`
    -> Fetching podspec for `share` from `.symlinks/plugins/share/ios`
    -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
    -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
    -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_1_6_1.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/1/6/1/DKImagePickerController/4.3.2/DKImagePickerController.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/1/6/1/DKImagePickerController/4.3.2/DKImagePickerController.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.34.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.26.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.26.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.26.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_2_4_b.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/2/4/b/PhoneNumberKit/3.3.1/PhoneNumberKit.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/2/4/b/PhoneNumberKit/3.2.0/PhoneNumberKit.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.26.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_f_4_e.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/6.26.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_2_d_6.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/2/d/6/FirebaseMessaging/4.7.1/FirebaseMessaging.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/2/d/6/FirebaseMessaging/4.4.1/FirebaseMessaging.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_6_f_9.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/6/f/9/FirebaseAnalyticsInterop/1.5.0/FirebaseAnalyticsInterop.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_8_b_d.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/8/b/d/FirebaseCore/6.10.4/FirebaseCore.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_3_6_0.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/3/6/0/FirebaseInstanceID/4.8.0/FirebaseInstanceID.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_8_4.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/6.7.2/GoogleUtilities.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/6.7.2/GoogleUtilities.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/6.7.2/GoogleUtilities.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/6.7.2/GoogleUtilities.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/6.7.2/GoogleUtilities.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_e_c_d.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/e/c/d/Protobuf/4.0.0-rc1/Protobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/e/c/d/Protobuf/3.13.0/Protobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_6_3_6.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/6/3/6/FirebaseAuth/6.9.2/FirebaseAuth.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_4_2_7.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/2/7/FirebaseAuthInterop/1.1.0/FirebaseAuthInterop.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_c_e_3.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/c/e/3/GTMSessionFetcher/1.4.0/GTMSessionFetcher.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/c/e/3/GTMSessionFetcher/1.4.0/GTMSessionFetcher.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_e_7_d.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/e/7/d/FirebaseCrashlytics/4.6.2/FirebaseCrashlytics.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/e/7/d/FirebaseCrashlytics/4.1.1/FirebaseCrashlytics.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_2_f_7.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/2/f/7/FirebaseInstallations/1.7.0/FirebaseInstallations.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_b_5.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/b/5/PromisesObjC/1.2.11/PromisesObjC.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_6_a.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/6/a/GoogleDataTransport/7.5.1/GoogleDataTransport.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_b_c_f.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/b/c/f/GoogleDataTransportCCTSupport/3.2.0/GoogleDataTransportCCTSupport.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_6_1_e.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/6/1/e/nanopb/2.30906.0/nanopb.podspec.json exists! Returning local because checking is only perfomed in repo update
    [!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
      In snapshot (Podfile.lock):
        GoogleDataTransport (= 7.4.0, ~> 7.4)

      In Podfile:
        firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) was resolved to 0.2.1-1, which depends on
          Firebase/Crashlytics (~> 6.26.0) was resolved to 6.26.0, which depends on
            FirebaseCrashlytics (~> 4.1.1) was resolved to 4.1.1, which depends on
              GoogleDataTransport (~> 6.1)


    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * changed the constraints of dependency `GoogleDataTransport` inside your development pod `firebase_crashlytics`.
       You should run `pod update GoogleDataTransport` to apply changes you've made.

    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:414:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/installer.rb:160:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.rc.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳

    [!] Automatically assigning platform `iOS` with version `10.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install
Error launching application on iPhone 11 Pro.

推荐答案

What does this mean for you?

嗯,基本上你的CocoaPods设置是is going to break.您将不得不手动删除规范存储库的任何本地副本,并重新克隆新版本的规范存储库.

在应用了很多解决方案之后,我找到了一种成功地解决这个错误的方法,大概是这样的

可以通过在终端中执行以下命令来解决.

  1. 转到项目内的/ios文件夹.

  2. 删除Podfile.lock(YourPoject/iOS/Podfile.lock)

  3. 在这里,你必须按照chip of your Mac来做,在这里,我已经给出了两者.感谢@Kamal Panara为我们做的一切

    For 100 users

    1. 运行pod install --repo-update(确保您的cd进入Flatter应用程序的iOS目录)

    For 100 Users

    1. 先在常规终端中安装ffi(如果没有),使用命令:sudo arch -x86_64 gem install ffi,然后安装arch -x86_64 pod install --repo-update
  4. 运行flutter clean分钟

  5. 完成后,重建Flutter 应用程序:flutter run

P.S-如果你第一次完成了所有的过程,但仍然没有解决你的问题.然后在步骤2之后运行该命令pod repo remove trunk.感谢@drpaWelo确认了这一点

Ios相关问答推荐

iOS SwiftUI需要不带箭头显示弹出窗口""

如何在SwiftUI中以一定Angular 绘制直线(&A)

如何在iOS中以编程方式推送另一个页面?

SwiftUI检测顶级和安全区域插图

分配给指针会通过 class_addMethod 导致 EXC_BAD_ACCESS

SwiftUI 点击列表内不会触发 Select

为什么IOS多行文本输入在React原生纸张对话框中无法正常工作?

不使用故事板创建 iMessage 应用程序

由于缺少 libarclite_iphonesimulator.a 文件,将 XCode 升级到 14.3 后无法在模拟器上运行 Flutter 应用程序

如何使用 AppIntents 在 SwiftUI 应用程序中打开特定视图

SwiftUI - 使用切换switch 切换键盘类型(默认/数字)?

使用swift将图像转换为A4大小的pdf

使用 RxDatasources 作为数据源时如何填充自定义页眉/页脚视图

如何将 ImageView 放置在 UIView 的中心?

如何在 UIActivityViewController 中设置邮件主题?

从 NSData 或 UIImage 中查找图像类型

cocoapods中~>的用法是什么

iOS:设备旋转后如何运行函数(Swift)

iOS应用程序每隔一次启动就会崩溃,找不到错误

SwiftUI 应用生命周期 iOS14 AppDelegate 代码放哪里?