2017-01-05 192 views
0

當我在我的系統中安裝可可豆莢時,出現以下錯誤。安裝可可豆莢時出錯

錯誤:

「無法添加名爲master-1網址https://github.com/CocoaPods/Specs.git源,您可以嘗試在~/.cocoapods/repos或通過pod repo add手動加[!]。」

莢文件:

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

target 'Demo' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for Demo 

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

    target 'DemoUITests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 
pod 'AZSClient' 
    pod 'CardIO' 
    pod 'Google/Analytics' 
    pod 'OpenTok' 
    pod 'THCalendarDatePicker', '~> 1.2.6' 
end 
+0

你可以包含你的podfile嗎? – dpassage

+0

嘗試卸載莢並安裝最新的莢,這將幫助你在這種情況下。 –

回答

0

我得到了同樣的問題,有時它只是由所需的可可和可可豆莢的版本不匹配發生。

我的解決方案如下:

pod repo remove master 
pod setup 
pod install 

如果仍然遵循任何問題,然後讓我知道。

這種變化您的POD文件:

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

target 'Demo' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for Demo 

pod 'AZSClient' 
    pod 'CardIO' 
    pod 'Google/Analytics' 
    pod 'OpenTok' 
    pod 'THCalendarDatePicker', '~> 1.2.6' 
end` 

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

    target 'DemoUITests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 
+0

pod repo刪除master和pod setup命令已成功執行。但是,pod安裝命令執行導致出現以下錯誤:[!]無法添加名爲'master-1'的網址爲https:// github.com/CocoaPods/Specs.git的源代碼。 您可以嘗試在'〜/ .cocoapods/repos'或者'pod repo add'手動添加它。 – Krishu

+0

@Krishu重新檢查我的回答 –

+0

謝謝......它的工作:) – Krishu

0

不能在目標上使用的目標。

試試這個。

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

target 'Demo' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for Demo 
    pod 'AZSClient' 
    pod 'CardIO' 
    pod 'Google/Analytics' 
    pod 'OpenTok' 
    pod 'THCalendarDatePicker', '~> 1.2.6' 

end 

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

target 'DemoUITests' do 
    inherit! :search_paths 
    # Pods for testing 
end 
+0

和目前'CardIO'存儲庫不起作用。 所以你必須檢查'CardIO'存儲庫。或暫時取消「CardIO」。 –

+0

謝謝你...它的工作:) – Krishu

+0

好的..我會檢查它。 – Krishu

2

寫使用這些線路莢文件:

platform :ios, '10.0' 
target 「GoogleAnalyticsTestApp」 do 
    pod 'GoogleAnalytics' 
end 

不要谷歌/分析。寫GoogleAnalytics。希望它能解決問題。