【问题标题】:Is there a way that I can fix this cocoapods related error?有没有办法可以修复这个与 cocoapods 相关的错误?
【发布时间】:2022-01-19 15:31:33
【问题描述】:

感谢您阅读我的问题。

我想问你为什么我运行我的应用时会出现下面的错误!

正在调试模式下在 iPhone 12 Pro Max 上启动 lib/main.dart... 正在运行 pod install... CocoaPods 的输出:↳ 准备中

Analyzing dependencies

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

Finding Podfile changes
  - Flutter
  - audioplayers
  - cloud_firestore
  - firebase_analytics
  - firebase_auth
  - firebase_core
  - google_sign_in
  - path_provider_ios

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `audioplayers` from `.symlinks/plugins/audioplayers/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.10.0' defined in 'firebase_core'
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `path_provider_ios` from `.symlinks/plugins/path_provider_ios/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
  CDN: trunk Relative path: Specs/0/3/5/Firebase/8.10.0/Firebase.podspec.json exists! Returning

local 因为检查只在 repo update 中执行 CDN:trunk 相对路径:all_pods_versions_d_4_0.txt 存在!返回本地,因为仅在 repo 更新中执行检查 CDN:trunk 相对路径:Specs/d/4/0/GoogleSignIn/6.1.0/GoogleSignIn.podspec.json 存在! 返回本地,因为仅在 repo 更新中执行检查 CDN:trunk 相对路径:Specs/0/3/5/Firebase/8.10.0/Firebase.podspec.json 存在!返回 本地,因为仅在 repo update 中执行检查 [!] CocoaPods 找不到 pod "Firebase/CoreOnly" 的兼容版本: 在快照(Podfile.lock)中: Firebase/CoreOnly (= 8.9.0)

  In Podfile:
    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.11.0, which depends on
      Firebase/CoreOnly (= 8.10.0)


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 `Firebase/CoreOnly` inside your development pod `firebase_core`.
   You should run `pod update Firebase/CoreOnly` to apply changes you've made.

/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
<internal:kernel>:90:in `tap'
/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in

resolve' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in resolve' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in block in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in analyze' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in analyze' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in block in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in section' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in install!' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in run' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in &lt;top (required)&gt;' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in load' /opt/homebrew/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `'

错误:CocoaPods 的规范存储库过时,无法满足要求 依赖关系。要更新 CocoaPods 规范,请运行: pod repo update

运行 pod install 时出错 在 iPhone 12 Pro 上启动应用程序时出错 最大。

我知道这是很长的错误。

如上所述,我尝试过pod repo updatepod install --repo-updatepod update Firebase/CoreOnly

一切都不能解决这个错误。

所以我尝试重新安装 cocoapods

它是最新版本,但仍然无法修复此错误。

我该如何解决这个错误?

如果有人知道,请帮助我!!

【问题讨论】:

    标签: flutter cocoapods


    【解决方案1】:

    在终端上运行以下命令

    flutter clean
    cd ios 
    delete Pods
    delete Podfile.lock
    flutter pub get
    pod install
    flutter clean && flutter run
    

    【讨论】:

      猜你喜欢
      • 2020-09-09
      • 2021-04-24
      • 1970-01-01
      • 1970-01-01
      • 2021-06-05
      • 1970-01-01
      • 1970-01-01
      • 2020-03-01
      • 1970-01-01
      相关资源
      最近更新 更多