CocoaPods - 无法找到`GoogleMaps`的规范

Was*_*lil 6 google-maps ios cocoapods

我是新来的iOS,我已经AlamofireMarqueeLabelPodfile现在尝试添加GoogleMaps,它不断出现这条消息,

[!] Unable to find a specification for `GoogleMaps`
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

我甚至试过这个

pod 'GoogleMaps',
    :git => 'https://github.com/CocoaPods/Specs.git'
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

Muh*_*aig 12

我通过以下步骤解决了这个问题:

  1. 开放式终端.
  2. 转到您的项目路径.
  3. 类型:

    pod repo update

  4. 再次安装pod.


gui*_*dev 10

尝试删除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
Run Code Online (Sandbox Code Playgroud)

编辑:

您的本地回购似乎有问题.尝试清理并重新安装:

pod repo remove master
pod setup
Run Code Online (Sandbox Code Playgroud)