我是iOS的新用户,我Alamofire
上已经有MarqueeLabel
和Podfile
,现在正在尝试添加GoogleMaps
,它会一直显示此消息,
[!] Unable to find a specification for `GoogleMaps`
我的Podfile
看起来像这样
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'Migapixel' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'GoogleMaps'
pod 'Alamofire',
:git => 'https://github.com/Alamofire/Alamofire.git',
:branch => 'master',
:tag => '4.0.0'
pod 'MarqueeLabel/Swift',
:git => 'https://github.com/cbpowell/MarqueeLabel.git'
# Pods for Migapixel
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end
target 'MigapixelTests' do
inherit! :search_paths
end
target 'MigapixelUITests' do
inherit! :search_paths
# Pods for testing
end
end
我甚至试过这个
pod 'GoogleMaps',
:git => 'https://github.com/CocoaPods/Specs.git'
我做错了什么?
答案 0 :(得分:12)
我通过以下步骤解决了这个问题:
型:
pod repo update
答案 1 :(得分:7)
尝试删除source 'https://github.com/CocoaPods/Specs.git'
并将use_frameworks!
移出目标块。此外,您不需要手动设置Alamofire和MarqueeLabel的git路径。
试试这个:
platform :ios, '9.0'
use_frameworks!
target 'Migapixel' do
pod 'GoogleMaps'
pod 'Alamofire'
pod 'MarqueeLabel/Swift'
# Pods for Migapixel
end
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end
target 'MigapixelTests' do
inherit! :search_paths
end
target 'MigapixelUITests' do
inherit! :search_paths
# Pods for testing
end
编辑:
您的本地回购似乎有问题。 尝试清理并重新安装:
pod repo remove master
pod setup
答案 2 :(得分:1)
尝试了很多东西以后就是修复!!
Imp:确保您的PodFile中有这些行
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
pod 'GoogleMaps'
end
如果上述情况不错,则需要更新播客: 请尝试以下步骤:
打开一个新终端并在临时目录中运行以下命令。
pod try GoogleMaps
保持耐心!这需要一些时间,但会更新吊舱。
pod repo update
再试一次。 评论任何问题!!