当我在我的系统中安装cocoa pod时,出现了以下错误。
错误:
“[!]无法添加名为https://github.com/CocoaPods/Specs.git
的网址master-1
的来源。您可以尝试在~/.cocoapods/repos
或pod repo add
中手动添加。”
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
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 :(得分:2)
使用以下行写下pod文件:
platform :ios, '10.0'
target “GoogleAnalyticsTestApp” do
pod 'GoogleAnalytics'
end
不要撰写 Google / Analytics 。写 GoogleAnalytics 。希望它能解决问题。
答案 1 :(得分: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
答案 2 :(得分: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