我正在尝试运行使用 Firebase 的 Flutter 应用程序并收到以下错误。我的应用程序运行良好,直到我需要运行“颤振升级”以使我的应用程序与我正在使用的新包(fl_chart)兼容。请注意,我使用的是 M2 Macbook。
运行 pod install...485ms CocoaPods 的输出: ↳ 准备中
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Using `ARCHS` setting to build architectures of target `Pods-RunnerTests`: (``)
Finding Podfile changes
- FlutterMacOS
- firebase_auth
- firebase_core
- path_provider_foundation
- window_size
Fetching external sources
-> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
-> Fetching podspec for `firebase_auth` from
`Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`
firebase_auth: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from
`Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
-> Fetching podspec for `path_provider_foundation` from
`Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`
-> Fetching podspec for `window_size` from
`Flutter/ephemeral/.symlinks/plugins/window_size/macos`
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/10.20.0/Firebase.podspec.json exists!
Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_c_0_4.txt exists! Returning local because
checking is only performed in repo update
CDN: trunk Relative path: Specs/c/0/4/Flutter/3.13.0/Flutter.podspec.json exists! Returning
local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/10.18.0/Firebase.podspec.json exists!
Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In snapshot (Podfile.lock):
Firebase/CoreOnly (= 10.12.0, ~> 10.12.0)
In Podfile:
firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`) was
resolved to 4.16.0, which depends on
Firebase/CoreOnly (~> 10.18.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_auth`.
You should run `pod update Firebase/CoreOnly` to apply changes you've made.
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.r
b:317:in `raise_error_unless_state'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.r
b:299:in `block in unwind_for_conflict'
<internal:kernel>:90:in `tap'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.r
b:297:in `unwind_for_conflict'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.r
b:257:in `process_topmost_state'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.r
b:182:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:
43:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/resolver.rb
:94:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/a
nalyzer.rb:1082:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interf
ace.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/a
nalyzer.rb:1080:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer/a
nalyzer.rb:125:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.r
b:422:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.r
b:244:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/user_interf
ace.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.r
b:243:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/installer.r
b:162:in `install!'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command/ins
tall.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in
`run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:
52:in `run'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/gems/cocoapods-1.15.0/bin/pod:55:in `<top
(required)>'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.15.0/libexec/bin/pod:25:in `<main>'
错误:CocoaPods 的规范存储库太旧,无法满足依赖关系。 要更新 CocoaPods 规范,请运行: pod 仓库更新
异常:运行 pod install 时出错
我已经尝试过许多其他线程中提出的解决方案,包括在重新安装 pod 之前删除 ios/Pods/.. 和 Podfile.lock、在 Xcode 中将所有 pod 配置更改为“无”、简单地运行“pod repo update”等,但似乎什么也没有上班。我总是遇到同样的错误。
根据错误消息,Podfile 正在请求不兼容版本的 Firebase/CoreOnly。 Podfile 中请求的 Firebase 版本需要更新。
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In snapshot (Podfile.lock):
Firebase/CoreOnly (= 10.12.0, ~> 10.12.0)
In Podfile:
firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`) was
resolved to 4.16.0, which depends on
Firebase/CoreOnly (~> 10.18.0)