Pod GoogleMaps无法正常工作

Sta*_*der 1 ios cocoapods

我知道这是非常基本的,但无法调试问题.这是我的Podfile.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'
Run Code Online (Sandbox Code Playgroud)

我从这里选了这个.当我尝试时pod install,我明白了

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

详细说:

  Preparing

Updating local specs repositories

Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  Already up-to-date.

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods`: (``)

Finding Podfile changes
  - GoogleMaps

Resolving dependencies of `Podfile`
[!] Unable to find a specification for `GoogleMaps`

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:388:in `handle_resolver_error'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:56:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:535:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:533:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:133:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:132:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
Run Code Online (Sandbox Code Playgroud)

Swi*_*ect 7

重新开始:

  1. 创建一个新的,干净的Xcode项目
  2. pod init
  3. 添加下面的行 Podfile
  4. pod install

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'

target 'SO-32079263' do
pod 'GoogleMaps'
end
Run Code Online (Sandbox Code Playgroud)

pod安装 测试用0.37.1

Analyzing dependencies

Downloading dependencies
Installing GoogleMaps (1.10.1)
Generating Pods project
Integrating client project
Run Code Online (Sandbox Code Playgroud)

不太新鲜:( Jatin评论)

替代步骤2: rm -rf Pods/ Podfile Podfile.lock ; pod init