无法通过CocoaPods安装GoogleMaps [英] Can't install GoogleMaps with CocoaPods

查看:54
本文介绍了无法通过CocoaPods安装GoogleMaps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目中安装iOS版GoogleMap SDK.但是当我使用pod install安装它时出现了错误.

I want to install the GoogleMap SDK for iOS in my project. But when I installed with pod install it got an error.

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

pod repo remove master;广告连播设置没有帮助. pod回购更新-详细

    Updating spec repo `.git`
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git fetch origin
  From https://github.com/CocoaPods/Specs
     42723a4..830f47f  master     -> origin/master
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git rev-parse --abbrev-ref
  HEAD
  HEAD
  $ /usr/bin/git -C /Users/admin/.cocoapods/repos/.git reset --hard origin/HEAD
  fatal: ambiguous argument 'origin/HEAD': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
[!] CocoaPods was not able to update the `.git` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

我的Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Interests' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Interests
    pod 'GoogleMaps'
  target 'InterestsTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'InterestsUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

推荐答案

使用此方法通过brew重新安装,从而解决了该问题

Using this approach of reinstalling via brew which fixed the issue.

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo gem uninstall cocoapods
brew install cocoapods --with-brewed-curl --with-brewed-openssl

这篇关于无法通过CocoaPods安装GoogleMaps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆