0

在我的系统中安装可可豆荚时,出现以下错误。

错误 :

“[!] 无法添加https://github.com/CocoaPods/Specs.git名为url 的源master-1。您可以尝试手动添加它~/.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
4

3 回答 3

2

使用这些行编写 pod 文件:

platform :ios, '10.0'
target “GoogleAnalyticsTestApp” do
   pod 'GoogleAnalytics'
end

不要Google/Analytics。编写GoogleAnalytics。希望它能解决问题。

于 2017-01-23T11:52:38.133 回答
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
于 2017-01-05T05:39:51.460 回答
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
于 2017-01-05T04:53:17.877 回答