我正在努力
吊舱安装
对于我的项目,但它不起作用,它给出了这个错误: 我把Xcode更新到15,macOS更新到14。以前的版本没有问题。
Flutter 版本: 3.19.
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 2.0.0, which depends on
Firebase/Auth (= 9.6.0) was resolved to 9.6.0, which depends on
FirebaseAuth (~> 9.6.0) was resolved to 9.6.0, which depends on
GTMSessionFetcher/Core (< 3.0, >= 1.7)
google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
GTMSessionFetcher (>= 3.4.0) was resolved to 3.4.1, which depends on
GTMSessionFetcher/Full (= 3.4.1) was resolved to 3.4.1, which depends on
GTMSessionFetcher/Core (= 3.4.1)
google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
GTMAppAuth (< 5.0, >= 4.1.1) was resolved to 4.1.1, which depends on
GTMSessionFetcher/Core (< 4.0, >= 3.3)
google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
GTMSessionFetcher/Core (~> 3.3)
Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '12.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__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
我的 pubspec.yaml 中的一些 Firebase 库:
firebase_analytics: ^8.1.2
firebase_auth: ^2.0.0
firebase_core: ^1.3.0
firebase_messaging: ^10.0.3
firebase_storage: ^9.0.0
cloud_firestore: ^2.3.0
google_sign_in: ^5.0.4
我该如何解决我的问题?如果你有帮助,我会很高兴。 问题是什么?也许是 firebase,也许是 xcode,也许是 macos,也许是 flutter
尝试像这样更新你的 pod:
pod deintegrate
pod init
pod install
pod repo update
当我更新操作系统版本或 xcode 版本并且一切都停止工作时,本指南总是对我有帮助