[英]Error while installing cocoa pods
While I am installing cocoa pod in my system, I got following error. 当我在系统中安装可可豆荚时,出现以下错误。
Error : 错误:
"[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git
named master-1
. You can try adding it manually in ~/.cocoapods/repos
or via pod repo add
." “ [!]无法添加名称为
master-1
URL https://github.com/CocoaPods/Specs.git
的源。您可以尝试在~/.cocoapods/repos
手动添加或通过pod repo add
。”
pod file: 荚文件:
# 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
Write the pod file using these lines: 使用以下几行编写pod文件:
platform :ios, '10.0'
target “GoogleAnalyticsTestApp” do
pod 'GoogleAnalytics'
end
Do not write Google/Analytics . 不要写Google / Analytics 。 Write GoogleAnalytics .
编写GoogleAnalytics 。 Hope it will solve the problem.
希望它能解决问题。
I got the same issue and some times it just happened by the mismatch version of the required cocoa and cocoa pod. 我遇到了同样的问题,有时是由于所需可可和可可豆的不匹配版本而发生的。
My solution is as follows : 我的解决方案如下:
pod repo remove master
pod setup
pod install
If you still follow any issue then let me know. 如果您仍然遇到任何问题,请告诉我。
Change your pod file with this: 使用以下方法更改您的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
You can't use target in target. 您不能在target中使用target。
Try this. 尝试这个。
# 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.