gpt4 book ai didi

ios - 无法通过CocoaPods安装GoogleMaps

转载 作者:行者123 更新时间:2023-12-01 18:41:45 25 4
gpt4 key购买 nike

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

[!] Unable to find a specification for `GoogleMaps`
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`

关于ios - 无法通过CocoaPods安装GoogleMaps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41901278/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com