简体   繁体   English

CocoaPods 在 Flutter 项目中找不到 pod“FirebaseCore”的兼容版本

[英]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:我尝试了几个步骤来修复:

  • flutter clean flutter 清洁
  • flutter build ios flutter 构建 ios
  • pod install吊舱安装
  • pod update吊舱更新
  • pod repo update pod 回购更新
  • pod install --repo-update pod 安装 --repo-update

And also:并且:

  • delete Pods删除 Pod
  • delete Podfile.lock删除 Podfile.lock
  • Then pod install然后pod安装

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_coreflutter pub getflutter pub upgrade

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CocoaPods 找不到 pod“FirebaseCore”的兼容版本:为 flutter iOS 构建运行 pod 安装时出错 - CocoaPods could not find compatible versions for pod "FirebaseCore" : error on running pod install for flutter iOS build CocoaPods 找不到 pod“FirebaseAppCheck”的兼容版本 - CocoaPods could not find compatible versions for pod "FirebaseAppCheck" CocoaPods 找不到 pod“FirebaseFirestore”的兼容版本: - CocoaPods could not find compatible versions for pod "FirebaseFirestore": CocoaPods 找不到 pod“Firebase/Core”的兼容版本 | cloud_firestore,Flutter - CocoaPods could not find compatible versions for pod "Firebase/Core” | cloud_firestore, Flutter CocoaPods 找不到 pod“Firebase/Everything”的兼容版本 - CocoaPods could not find compatible versions for pod "Firebase/Everything" CocoaPods 找不到 pod“GTMSessionFetcher/Core”的兼容版本 - CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core" CocoaPods 找不到 pod“Firebase/Auth”的兼容版本: - CocoaPods could not find compatible versions for pod "Firebase/Auth": CocoaPods 找不到 pod“Firebase/CoreOnly”的兼容版本 - CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" CocoaPods 找不到 pod“Firebase/Database”的兼容版本 [Geofire 问题] - CocoaPods could not find compatible versions for pod "Firebase/Database" [Geofire issue] Nativescript IOS 构建 Cacoapods 找不到 pod 的兼容版本 - Nativescript IOS build Cacoapods could not find compatible versions for pod
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM