[英]Can't install GoogleMaps with CocoaPods
我想在我的項目中安裝iOS版GoogleMap SDK。 但是當我使用pod install安裝時,出現了錯誤。
[!] Unable to find a specification for `GoogleMaps`
pod repo remove master ; pod setup
pod repo remove master ; pod setup
無濟於事。 pod repo update --verbose
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
您需要在Podfile的頂部指定Specs倉庫,如下所示:
source 'https://github.com/CocoaPods/Specs.git'
我看到的是這種情況,因為您列出了錯誤:
Updating spec repo `.git`
[!] 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`
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.