2017-01-05 159 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。希望它能解决问题。