找不到 GooglePlaces 的规格说明。

5

I'm following this tutorial, however when I run

pod install

在第二步的第6部分中,我遇到了错误。
[!] Unable to find a specification for `GooglePlaces`

请问您知道为什么会发生这种情况吗?

更新: Podfile的内容如下:

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

YOUR_APPLICATION_TARGET_NAME_HERE更改为我的目标名称。


这是一个引号的问题,我认为你可以尝试使用 pod 'GooglePlaces' .. 将这行代码从文档中复制粘贴到你的 podfile 中,不要自己手动输入。 - Bhavin Bhadani
@EICaptainv2.0 没有起作用 :( 相同的错误。 - jigglypuff
3个回答

4

这对我似乎有用:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'WhatsOpen' do
  pod 'GoogleMaps'
  pod 'GooglePlacesAPI'
end

尝试了Nilesh Jha的答案后,我做了以下操作。

它也表明: [!] GooglePlaces已被GooglePlacesAPI所取代 因此我将'GooglePlaces'替换为'GooglePlacesAPI',看起来它已经满意了。


注意,GooglePlacesAPI 不是一个 Google 的框架。当我从旧的单体式 GoogleMaps 升级到 GooglePlaces 时,我也走过这条路,但是我的所有源代码都不兼容。 - Pierre Houston

1
不要使用GooglePlacesAPI,如果你期望与使用GoogleMaps pod的旧代码保持源代码兼容性。那是一个第三方框架,而不是谷歌的。
运行pod repo update,然后再尝试pod install。另外,我添加了一个版本使得这一行pod 'GooglePlaces', '~> 2.0',但我不知道是否需要。

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接