[英]CocoaPods could not find compatible versions for pod "FirebaseCore" : error on running pod install for flutter iOS build
[英]CocoaPods could not find compatible versions for pod "FirebaseCore" in Flutter Project
[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
In Podfile:
firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 2.4.0, which depends on
Firebase/CoreOnly (= 10.3.0) was resolved to 10.3.0, which depends on
FirebaseCore (= 10.3.0)
google_ml_kit (from `.symlinks/plugins/google_ml_kit/ios`) was resolved to 0.6.0, which depends on
GoogleMLKit/LinkFirebase (~> 2.2.0) was resolved to 2.2.0, which depends on
MLKitLinkFirebase (~> 1.3.0) was resolved to 1.3.0, which depends on
FirebaseCore (~> 8.0)
將 firebase 添加到我的項目后出現此錯誤。
這是我的 PodFile
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
我嘗試了幾個步驟來修復:
並且:
它不能修復錯誤
可能缺少某些依賴項。 您是否嘗試過flutter pub add firebase_core
、 flutter pub get
或flutter pub upgrade
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.