2017-01-27 8 views
0

私のプロジェクトにiOS用GoogleMap SDKをインストールします。しかし、私がポッドインストールでインストールすると、エラーが発生しました。CocoaPodsでGoogleMapsをインストールできない

[!] 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 
+0

'pod repo update --verbose'の出力を投稿できますか? – JAL

+0

これをチェックしてください:http://stackoverflow.com/questions/32079263/pod-googlemaps-not-working –

+0

あなたはあなたの '目標 'の後ろに"終わり "ターゲット "コマンドと2つの"終了 "コマンド –

答えて

1

問題を解決したvia brewを再インストールするthis approachを使用してください。

/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 
1

あなたは次のようにPodfileの上部に仕様のレポを指定する必要があります。

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` 
+0

それは役に立ちません。 – Vladius001

+0

つまり、Podfileがなくても間違いなく壊れてしまったので、あなたの質問を更新してこの変更を反映しているのがわかります。 – bdrelling

+0

ええ、そうです。ありがとう。 – Vladius001

関連する問題