简体   繁体   English

CocoaPods 找不到 pod“Firebase/Crashlytics”的兼容版本

[英]CocoaPods could not find compatible versions for pod “Firebase/Crashlytics”

I am developing react-native app.我正在开发 react-native 应用程序。

I followed the firebase instruction adding my iOS app to my firebase project.我按照 firebase 指令将我的 iOS 应用程序添加到我的 firebase 项目中。

In my Podfile, I have:在我的 Podfile 中,我有:

pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'

when I run pod install I keep getting the error saying "CocoaPods could not find compatible versions for pod "Firebase/Crashlytics".当我运行pod install时,我不断收到错误消息“CocoaPods 找不到 pod “Firebase/Crashlytics”的兼容版本。 在此处输入图像描述

Xcode version 11.7, target iOS10.1 Xcode 11.7版,目标iOS10.1

Why I get that error and how to get rid of it?为什么我会收到该错误以及如何摆脱它?

(I tried run pod update 'Firebase' , I get: (我尝试运行pod update 'Firebase' ,我得到:

[!] The Firebase Pod is not installed and cannot be update) [!] Firebase Pod 未安装且无法更新)

Make sure that your project's minimum deployment target (the one that referenced in your Podfile ) is at least iOS 9 (see Firebase/Crashlytics release notes )确保您的项目的最小部署目标(在您的Podfile中引用的那个)至少为 iOS 9(请参阅 Firebase/Crashlytics 发行说明

Unfortunately when cocoapods initially create the Podfile , doesn't take into account your projects minimum deployment target.不幸的是,当 cocoapods 最初创建Podfile时,没有考虑您的项目最小部署目标。 Instead adds a default value in a comment.而是在注释中添加默认值。

The first time that you run pod install you will get a warning about not specified minimum deployment target.第一次运行pod install时,您将收到有关未指定最小部署目标的警告。 Also cocoapods documentation doesn't mention anything regarding this behavior. cocoapods文档也没有提及有关此行为的任何内容。

So, you have to have to manually edit your Podfile and add something like this:因此,您必须手动编辑 Podfile 并添加如下内容:

platform :ios, '10.1'

No issue with the deployment target but got the same error.部署目标没有问题,但出现了同样的错误。 It was working with the following versions of Firebase它正在使用以下版本的 Firebase

 pod 'Firebase/Core', '~> 3.0.0'
 pod 'Firebase/Crashlytics', '~> 7.0.0'

When I added a new dependency and run pod install, It was showing the error for Firebase.当我添加一个新的依赖项并运行 pod install 时,它显示了 Firebase 的错误。 So, I used the >= 0 in place of the version.所以,我用 >= 0 代替了版本。

pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'

This will install the latest version for all Firebase dependencies.这将为所有 Firebase 依赖项安装最新版本。

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

相关问题 Cocoapods:[!] CocoaPods 找不到 pod“Firebase/Storage”的兼容版本: - Cocoapods:[!] CocoaPods could not find compatible versions for pod “Firebase/Storage”: CocoaPods 找不到 pod“firebase_auth”的兼容版本:在 Podfile 中 - CocoaPods could not find compatible versions for pod "firebase_auth": In Podfile CocoaPods 找不到 pod“Firebase/Everything”的兼容版本 - CocoaPods could not find compatible versions for pod "Firebase/Everything" 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" Flutter:CocoaPods 找不到 pod“Firebase”的兼容版本 - Flutter: CocoaPods could not find compatible versions for pod "Firebase" CocoaPods找不到“ Moya”吊舱的兼容版本 - CocoaPods could not find compatible versions for pod “Moya” CocoaPods 找不到 pod“Protobuf”的兼容版本 - CocoaPods could not find compatible versions for pod "Protobuf" CocoaPods 找不到 pod“UMCore”的兼容版本 - CocoaPods could not find compatible versions for pod “UMCore” CocoaPods 找不到 pod “AFNetworking” 的兼容版本: - CocoaPods could not find compatible versions for pod “AFNetworking”:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM