[英]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)
I am getting this error after added firebase to my project.将 firebase 添加到我的项目后出现此错误。
Here is my PodFile这是我的 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
I've tried several steps to fix:我尝试了几个步骤来修复:
And also:并且:
It doesn't fix the error它不能修复错误
It might be some dependencies is missing.可能缺少某些依赖项。 Have you tried flutter pub add firebase_core
, flutter pub get
or flutter pub upgrade
您是否尝试过flutter pub add firebase_core
、 flutter pub get
或flutter pub upgrade
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.