ios - Cocoapods 0.39.0更新错误

标签 ios objective-c cocoapods google-analytics-sdk

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

[!] Unable to satisfy the following requirements:

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

项目信息:XCode 7、iOS9 SDK、8.0 部署目标、bitcode 在项目设置中被禁用。

Podfile:

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 Analytics 对 3.13 的依赖 - 另一个 pod 上的 pod 更新失败。

在我回退到 Cocoapods 0.38.2 后 - pod update 开始正常工作。

如何使 0.39.0 正常工作? 谢谢!

编辑: 看来 Cocoapods Core 存在一些问题:https://github.com/CocoaPods/CocoaPods/issues/4365

最佳答案

我认为您需要更新最新版本的 Google Analytics,只需删除版本号并安装 Pod 即可。

在 Xcode 7 中,可能需要最新版本。

在下面查找更多说明

您只需按照以下终端命令操作即可。当您要更新您的 pod 时,您只需关注以下终端命令。这些命令足以更新您的 pod。希望对您有帮助。

打开终端:

$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.

希望对你有用!

关于ios - Cocoapods 0.39.0更新错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33120288/

相关文章:

ios - 自定义 Cocoapod 总是返回 "No such module XXX"

ios - 如何使用 CocoaPods 配置目标的build设置?

iphone - IOS 5 - XCode 4 - 应用程序启动时的 SIGABRT

ios - 用几秒钟显示 iPhone 锁屏(自己使用)

objective-c - 在没有噪音的情况下改变音频音高的最佳方法是什么

iphone - Objective-C 中的单例共享数据源

ios - 使用 Cocoapods 响应 native

ios - UIView 渐变颜色在 UICollectionView 中未正确渲染

ios - 当navigationBar.isTranslucent为true时,navigationbar的backgroundImage也变成半透明

ios - 为什么使用 "contentOffset"后 UIScrollView 的 "scrollRectToVisible"没有改变?