【问题标题】:Unable to find a specification for GooglePlaces找不到 GooglePlaces 的规范
【发布时间】:2016-08-06 05:16:50
【问题描述】:

我正在关注this 教程,但是当我运行时

pod install

在第 2 步第 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 更改为我的目标名称。

【问题讨论】:

  • 它的 quatation 问题我认为尝试 pod 'GooglePlaces' .. 将这些行从 docs 复制并粘贴到您的 podfile ... 不要自己写
  • @EICaptainv2.0 没用:(同样的错误。

标签: ios google-maps


【解决方案1】:

这似乎对我有用:

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

这是在尝试了 Nilesh Jha 的回答之后。

它还说 [!] GooglePlaces has been deprecated in favor of GooglePlacesAPI 所以我将 'GooglePlaces' 替换为 'GooglePlacesAPI' 似乎很满意。

【讨论】:

  • 请注意,GooglePlacesAPI 不是 Google 框架。在从旧的单体 GoogleMaps 升级到 GooglePlaces 时,我也开始走这条路,但我的源代码都不兼容。
【解决方案2】:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'GoogleMaps'
pod 'GooglePlaces'

【讨论】:

    【解决方案3】:

    如果您希望源代码与使用 GoogleMaps pod 的旧代码兼容,请不要使用 GooglePlacesAPI。那是第 3 方框架,而不是 Google 的。

    运行pod repo update,然后再次尝试pod install。另外,我添加了一个版本来制作pod 'GooglePlaces', '~> 2.0'这一行,但我不知道是否需要。

    【讨论】:

      猜你喜欢
      • 2018-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-11
      • 2014-03-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多