这是我的播客文件:
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'Unity-iPhone' do
pod 'Google-Mobile-Ads-SDK', '7.3.1'
pod 'Firebase/Core'
end
当我运行“pod install”时,它工作得很好
输出:
Analyzing dependencies
Downloading dependencies
Using Firebase (4.13.0)
Using FirebaseAnalytics (4.2.0)
Using FirebaseCore (4.0.20)
Using FirebaseInstanceID (2.0.10)
Using Google-Mobile-Ads-SDK (7.3.1)
Using GoogleToolboxForMac (2.1.4)
Using nanopb (0.3.901)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 7 total pods installed.
完美,一切都很好,但如果我添加一个特定的版本与FirebaseCore,像下面的代码:
pod 'Firebase/Core','4.0.20'
和“pod安装”
输出:
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
In Podfile:
Firebase/Core (= 4.0.20)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Core (= 4.0.20)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
实际上,FirebaseCore与4.0.20是存在的,那么我应该如何修复它?
3条答案
按热度按时间rdlzhqv91#
我现在就修复了它,只需将Firebase/Core更改为FirebaseCore(我在GitHub中检查了FirebaseCore.podspec文件。)
balp4ylt2#
Firebase
和FirebaseCore
的podspec版本是分开的,因此不应互换使用。Firebase
pod是Firebase/Core
、Firebase/Analytics
等子规范的父项,但FirebaseCore
使用的版本不同,因为FirebaseCore
不是Firebase
的子规范,而Firebase/Core
是。Firebase
podspec可供参考:https://github.com/CocoaPods/Specs/blob/980d013a857e7ef973531f1cf85ddb5b8a56d1b0/Specs/0/3/5/Firebase/5.10.0/Firebase.podspec.jsonvyswwuz23#
在project/ios文件夹中按顺序运行以下命令: