Pod GoogleMaps无法正常工作

时间:2015-08-18 17:46:43

标签: ios cocoapods

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

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

我是从here选中的。当我尝试pod install时,我得到了

[!] Unable to find a specification for `GoogleMaps`

详细说:

  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>'

3 个答案:

答案 0 :(得分:7)

重新开始:

  1. 创建一个新的,干净的Xcode项目
  2. pod init
  3. Podfile
  4. 中添加以下行
  5. pod install
  6. <强> Podfile

    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '8.1'
    
    target 'SO-32079263' do
    pod 'GoogleMaps'
    end
    

    pod install 使用0.37.1 进行测试

    Analyzing dependencies
    
    Downloading dependencies
    Installing GoogleMaps (1.10.1)
    Generating Pods project
    Integrating client project
    

    不那么新鲜: (请参阅Jatin评论)

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

答案 1 :(得分:3)

这对我有用

  • 安装可可豆荚
      

    sudo gem install cocoapods

  • 创建一个新的Xcode项目(项目名称示例:我的项目)
  • 转到项目文件夹并创建名为 Podfile
  • 的新文件
  • 打开pod文件并输入以下配置 - 将“我的项目”更改为您的项目名称。

&GT;

source 'https://github.com/CocoaPods/Specs.git'
target 'My Project' do
pod 'GoogleMaps'
end

在终端中,导航到项目文件夹并键入 pod install

  

pod install

Analyzing dependencies
Downloading dependencies
Using GoogleMaps (1.13.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

答案 2 :(得分:0)

尝试了很多东西以后就是修复!!

Imp:确保您的PodFile中有这些行

Multiset<Integer>

如果上述情况不错,则需要更新播客: 请尝试以下步骤:

  1. 打开一个新终端并在临时目录中运行以下命令。

    how -> {1, 2} // because it appears once in doc1, twice in doc3 and none in doc2(so doc2's count should not be included) are -> {1, 1} // once in doc1 and once in doc3 you -> {1, 1} // once in doc1 and once in doc2 doing -> {3} // thrice in doc3, none in others what -> {2,1} // so on upto -> {1}

  2. 保持耐心!这需要一些时间,但会更新吊舱。

    1. 现在尝试再次在您的项目中安装pod。它应该工作。请尝试在项目目录中运行以下命令:
    2. source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' target 'YOUR_APPLICATION_TARGET_NAME_HERE' do pod 'GoogleMaps' end

      再试一次。 评论任何问题!!

相关问题