ios - CocoaPods 找不到 pod "Firebase/Core” 的兼容版本 | cloud_firestore, flutter

标签 ios firebase flutter cocoapods podfile

我在 pod 中遇到了一些问题,请参见下文

在 iPhone X 上以 Debug模式启动 lib/main.dart... 正在运行 pod 安装... CocoaPods 的输出: ↳ 准备中

Analyzing dependencies

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

Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`

Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Core

Specs satisfying the `Firebase/Core` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Core was resolved to 5.8.0, which depends on
        FirebaseAnalytics (= 5.1.2) was resolved to 5.1.2, which depends on
          GoogleUtilities/MethodSwizzler (~> 5.2.0)

Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "gRPC-Core":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Firestore was resolved to 5.8.0, which depends on
        FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on
          gRPC-C++ (~> 0.0.3) was resolved to 0.0.3, which depends on
            gRPC-C++/Implementation (= 0.0.3) was resolved to 0.0.3, which depends on
              gRPC-Core (= 1.14.0)

    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Firestore was resolved to 5.8.0, which depends on
        FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on
          gRPC-ProtoRPC (~> 1.0) was resolved to 1.14.1, which depends on
            gRPC-ProtoRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on
              gRPC (= 1.14.1) was resolved to 1.14.1, which depends on
                gRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on
                  gRPC-Core (= 1.14.1)

/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/resolver.rb:123:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:781:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:779:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:88:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

CocoaPods 的错误输出: ↳ [33m警告:CocoaPods 要求您的终端使用 UTF-8 编码。 考虑将以下内容添加到 ~/.profile:

    export LANG=en_US.UTF-8
    [0m

[!] Automatically assigning platform `ios` with version `8.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`.

运行 pod install 时出错 在 iPhone X 上启动应用程序时出错。

最佳答案

我的设置:VS Code、Flutter

如果你没有 Podfile.lock 文件并且 pod update 没有帮助,试试这个:

  1. 进入项目中的ios/Pods/Local Podspecs目录
  2. 检查每个 json 文件以找到所需的最高 ios 版本。我的是 "ios": "10.0" 在其中一些
  3. 回到ios/目录
  4. 打开 Podfile 文件
  5. 取消注释 # platform :ios, '9.0' 并将 9.0 替换为 2. 步骤中的版本,例如 10.0
    • # platform :ios, '9.0' > platform :ios, '10.0'
  6. 运行 pod install 错误应该消失了

关于ios - CocoaPods 找不到 pod "Firebase/Core” 的兼容版本 | cloud_firestore, flutter ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52398435/

相关文章:

ios - 将 UIImage 转换为 NSData 并返回 UIImage

ios - 为什么 [context executeFetchRequest : request error: &error] fail to get data sometimes when the data I need exist?

android - 如何在 Android 中停止 Firebase 事件监听器?

android - 为什么我在 android 7 上收到多个 FCM 通知

android - 升级后 nfc_in_flutter 构建失败

ios - 设置约束后获得正确的框架

ios - UISegmentedControl 在 View Controller 之间切换

android - Firebase 项目最大应用数量

dart - 如何使用一键式条件路由? ( flutter )

Flutter Web TextForm 字段