【发布时间】:2021-10-17 20:44:02
【问题描述】:
您好,我在添加 firebase 包并运行我的应用后将其添加到我的应用中,但出现此错误
abdulazizraja@mbp-abdulaziz newozapp % flutter run
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install... 928ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
firebase_messaging: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `webview_flutter_wkwebview` from
`.symlinks/plugins/webview_flutter_wkwebview/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.6.1/Firebase.podspec.json exists! Returning local
because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 8.3.3, which
depends on
Firebase/Analytics (= 8.7.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 8.7.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install
--repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in
`raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in
unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in
`unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in
`process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in
resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in
`resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in
resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in
`resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/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.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/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 `12.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 13 Pro Max.
abdulazizraja@mbp-abdulaziz newozapp %
我已尝试执行这些步骤
1- 删除 podfile.lock 文件 2-删除podfile文件 3- 删除 pods 文件 4-删除 .symlinks 文件 5-运行颤振清洁 6-运行颤振酒吧获取 7-CD IOS 8 次运行 pod 安装
当我运行 pod install 时出现此错误
abdulazizraja@mbp-abdulaziz ios % pod install
Analyzing dependencies
firebase_analytics: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 8.3.3, which depends on
Firebase/Analytics (= 8.7.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 8.7.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
这是我的颤振医生
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-arm, locale
en-IQ)
• Flutter version 2.5.2 at /Users/abdulazizraja/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (2 weeks ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/abdulazizraja/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.0, Build version 13A233
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
???? https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.61.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.27.0
[✓] Connected device (2 available)
• iPhone 13 Pro Max (mobile) • C3397850-A1E5-4CEA-B557-06DCCEB74A68 • ios
• com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
• Chrome (web) • chrome •
web-javascript • Google Chrome 94.0.4606.81
• No issues found!
所有 firebase 软件包都会发生这种情况
【问题讨论】: