安装可可豆荚时出错



当我在系统中安装可可豆荚时,我遇到了以下错误。

错误:

"[!无法添加网址https://github.com/CocoaPods/Specs.git名为 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

使用以下行编写 pod 文件:

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

不要谷歌/分析。写谷歌分析。希望它能解决问题。

我遇到了同样的问题,有时它只是发生在所需可可和可可豆荚的不匹配版本上。

我的解决方案如下:

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

不能在目标中使用目标。

试试这个。

# 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

最新更新