Cocoapods 0.39.0 更新报错

Cocoapods 0.39.0 update error

每次我 运行 pod installpod update 命令将 cocoapods 从 0.38.2 更新到 0.39.0 后,我收到错误

[!] Unable to satisfy the following requirements:

- `GoogleAnalytics (= 3.13)` required by `Podfile`

项目信息:XCode7,iOS9 SDK,8.0 部署目标,项目设置中禁用了 bitecode。

播客文件:

platform :ios, '8.0'

pod 'AFNetworking', '2.6.0'
pod 'Typhoon'
pod 'SSKeychain'
pod 'JBWebViewController', :git => 'https://github.com/Ponf/JBWebViewController', :commit => '19d15604a694e7436fa4934a5bf221f05360eb8c'
pod 'TTTAttributedLabel'
pod 'HockeySDK', '3.6.4'
pod 'GoogleAnalytics', '3.13'
pod 'Intercom'
pod 'FBSDKCoreKit'
pod 'OpenSans'
pod 'UIButton+Activity'
pod 'HexColors'
pod 'AFNetworkActivityLogger'
pod 'HCSStarRatingView', :git => 'https://github.com/hugocampossousa/HCSStarRatingView.git'
pod 'LGSideMenuController', '~> 1.0.0'
pod 'DateTools'
pod 'SDWebImage'

如果我删除 Google 分析对 3.13 的依赖 - 另一个 pod 上的 pod 更新失败。

在我回退到 Cocoapods 0.38.2 之后 - pod update 开始运行良好。

如何使 0.39.0 工作? 谢谢!

编辑: Cocoapods Core 中似乎存在一些问题:https://github.com/CocoaPods/CocoaPods/issues/4365

所以,问题出在 Cocoa 的 0.39.0 版本pods。在此版本中,pods 版本比较发生了一些变化,因此如果您依赖于具体版本,它可能会被破坏。

编辑:现在在此处跟踪问题:https://github.com/CocoaPods/CocoaPods/issues/4365

有可用的修复程序,但尚未正式发布。要手动尝试修复:

  1. 克隆 Cocoapods 存储库。
  2. 在 Gemfile 中替换

    cp_gem 'cocoapods_core'

    gem 'cocoapods-core', :git => 'https://github.com/CocoaPods/Core.git', :branch => 'master'

  3. 运行 bundle install.

希望对大家有所帮助:)

我认为你需要更新最新版本的Google Analytics,你只需删除版本号并安装pod。

在Xcode7中可能需要最新版本。

要在下面找到更多说明

您只需按照以下终端命令操作即可。当你要更新你的 pods 时,你只需关注下面的终端 commands.These 命令就足以更新你的 pods。希望对你有帮助。

打开终端:

$sudo gem update —system
$sudo gem uninstall cocoapods
$sudo gem install cocoapods
$pod setup
$cd <project path>
$pod init
$ open -a Xcode Podfile

将文件(框架名称)添加到您的 pod 文件中。 示例:

platform :ios, '7.0'

pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBAudienceNetwork'
pod 'FBSDKMessengerShareKit'
Save your pod file. then,

$pod install
$pod update(if you need)

框架将下载最新版本,如果我们没有提到版本名称。 例如:

pod 'AFNetworking'

Open your project folder --> Open the project workspace not the xcode project.

Clean the Project.

Run the Project.

希望对你有用!