美文网首页iOS 临点记录阅读记录pod依赖库
pods 使用中出现的各种问题总结

pods 使用中出现的各种问题总结

作者: 行走的风车 | 来源:发表于2016-06-23 18:25 被阅读2064次

pod install时出现

xcodeproj 'path/to/Project.xcodeproj'

Unable to find a specification for `xxxxx (~> 1.x.x)` depended upon by Podfile.

需要把当前Pod的目录清理一下就行了。在终端执行以下命令:

pod repo remove master

pod setup

setup成功后执行install或update即可。

遇到pod install或者pod update长时间卡在Updating local specs repositories

常见的解决方式是跳过更新cocoapods的spec仓库

pod install--verbose--no-repo-update

pod update--verbose--no-repo-update

Podfile文件格式

platform :ios, '7.0'

use_frameworks!

target 'xxxxx' do

pod 'AFNetworking', '~> 3.0.0'

pod 'BeeCloud/Alipay'

pod 'BeeCloud/Wx'

pod 'BaiduMapKit'

pod 'HYBNetworking', '3.0.0'

pod 'UMengAnalytics'

pod 'UMengSocialCOM', '~> 5.2.1'

pod 'XMNPhotoPickerFramework'

pod 'JElasticPullToRefresh'

end

Pod更新

讲下我的流程。。

1、安装brew http://brew.sh

2、brew install ruby  安装ruby

3、sudo gem install cocoapods --pre 更新pod

相关文章

网友评论

  • 牧马::-1: 瞎说,把master删了能解决问题,故意来坑人的吧你:sweat:
    苹果张张张:更新2个G...
    牧马:@blus_lee 实际上是依赖版本出现了冲突,如果pod repo update 后还不能解决问题,就得分析下日志里出现的pod是被哪些库依赖引用了,并且版本不一致
    blus_lee:我靠,我刚删完
  • 不必luo嗦:我在pod setup 卡死了 请问怎么解决
    行走的风车:@不必luo嗦 找个好的VPN。。你可以 cd ~/.cocoapods/repos/ 到这个目录下 执行du -sh * 看下下载了多少
    不必luo嗦:@赵鲁阳 有什么方法加速吗
    行走的风车:@不必luo嗦 不是卡死了,是在下载…过程有点漫长,我等了俩小时,400多兆

本文标题:pods 使用中出现的各种问题总结

本文链接:https://www.haomeiwen.com/subject/lttodttx.html