CocoaPods停止安装Firebase/Analytics(错误) [英] CocoaPods stopped installing Firebase/Analytics with error
问题描述
昨天我已经将Firebase/Analytics安装到iOS项目中(就像我之前做过很多次一样),今天我想添加Firebase/Crashlytics,突然两者都不再起作用.
I've installed Firebase/Analytics into an iOS Project yesterday (as I've done many times before) and today I wanted to add Firebase/Crashlytics and suddenly both of them don't work anymore.
我收到以下错误消息:
[!] CocoaPods找不到Pod"Firebase/Crashlytics"的兼容版本:在Podfile中:Firebase/Crashlytics(= 4.0.0)
[!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics": In Podfile: Firebase/Crashlytics (= 4.0.0)
还有其他可以正常使用的Pod(例如GoogleMaps,Resolver,Alamofire等).只是Firebase/*的东西不起作用.
There are other pods (e.g. GoogleMaps, Resolver, Alamofire, etc) which work fine. Just the Firebase/* stuff doesn't work.
如果我删除/并尝试安装FirebaseAnalytics和FirebaseCrashlytics,它可以工作(至少pod安装可以),但是xCode告诉我找不到Firebase模块.
If I remove the / and try to install FirebaseAnalytics and FirebaseCrashlytics it works (the pod install does at least) but then xCode tells me it cannot find the Firebase module.
这是我的荚包环境
xcode-select:错误:工具'xcodebuild'需要Xcode,但是活动的开发人员目录'/Library/Developer/CommandLineTools'是命令行工具实例
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
CocoaPods : 1.9.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.4 (19E287)
Xcode : ()
Git : git version 2.24.2 (Apple Git-127)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 8fd5e2704f3952940bbdb6fcc7dc6c138594e6ff
trunk - CDN - https://cdn.cocoapods.org/
安装源
Executable Path: /usr/local/bin/pod
插件
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.2.0
Podfile
# workspace 'project.xcworkspace'
platform :ios, '11.0'
use_frameworks!
# Pods for project
pod 'Resolver', '1.1.2'
pod 'GoogleMaps', '3.8.0'
pod 'GooglePlaces', '3.8.0'
pod 'Alamofire', '5.0.0-rc.2'
pod 'AlamofireObjectMapper', '6.2'
pod 'AlamofireNetworkActivityLogger', '3.0'
pod 'Firebase/Crashlytics', '4.0.0'
pod 'Firebase/Analytics', '6.4.2'
target 'project' do
# any project specific pods
end
我在这里有点茫然,任何提示将不胜感激.
I'm at a bit of a loss here and any hints would be greatly appreciated.
推荐答案
从 Firebase/Crashlytics
和 Firebase/Analytics
中删除斜线.
斜线表示Firebase容器的子规格.
The slash indicates a subspec of the Firebase pod.
您还可以保留斜线并指定最后一个Firebase容器的版本- 6.23.0
.
You could also leave the slash and specify the version of the last Firebase pod - 6.23.0
.
这篇关于CocoaPods停止安装Firebase/Analytics(错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!