[!] Unable to satisfy the following requirements: - `AFNetworking (~> 2.6.1)` required by `Podfile`
2016-01-22 10:05
676 查看
错误描述
控制台出现 如此错误:$ pod update Update all pods Updating local specs repositories Analyzing dependencies [!] Unable to satisfy the following requirements: - `AFNetworking (~> 2.6.1)` required by `Podfile` [!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
意思大概说你运行一下“$ pod repo update –verbose”检查一下,我运行完一堆语句,我又不懂是什么鬼。
解决错误-solve
$ pod search afnetworking结果出来显示最新版本为2.5.2,所以改pod文件。即 pod ‘AFNetworking’, ‘~> 2.5.2’
-> AFNetworking (2.5.2) A delightful iOS and OS X networking framework. pod 'AFNetworking', '~> 2.5.2' - Homepage: https://github.com/AFNetworking/AFNetworking - Source: https://github.com/AFNetworking/AFNetworking.git - Versions: 2.5.2, 2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-RC3, 2.0.0-RC2, 2.0.0-RC1, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0, 1.0RC3, 1.0RC2, 1.0RC1, 0.10.1, 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0, 0.5.1 [master repo] - Subspecs: - AFNetworking/Serialization (2.5.2) - AFNetworking/Security (2.5.2) - AFNetworking/Reachability (2.5.2) - AFNetworking/NSURLConnection (2.5.2) - AFNetworking/NSURLSession (2.5.2) - AFNetworking/UIKit (2.5.2)
反思错误
- 以后出现问题一步一步查问题
- 检查Podfile文件 检查 # platform :ios, ‘6.0’ 有没有指定版本
- 检查 库的版本。例子:前同事前两天问我Podfile里面这么写的,结果报错:
# platform :ios, '7.0' pod 'Alamofire'
后来 我在控制台输入
$ pod search Alamofire
运行结果
Elegant HTTP Networking in Swift pod 'Alamofire', '~> 1.1.4' - Homepage: https://github.com/Alamofire/Alamofire - Source: https://github.com/Alamofire/Alamofire.git - Versions: 1.1.4, 1.1.3 [master repo]
似乎看不出来什么,去官网https://github.com/Alamofire/Alamofire看看,不出所料
over!
相关文章推荐
- 设计模式之 Builder
- AFNetworking 报错Request failed: unacceptable content-type: text/html"
- iOS汉字转拼音,根据首字母创建索引条,UISearchController
- reponse.sendRedirect()和request.getRequestDispatcher().forward()的区别。
- 2016太原UI设计师给零基础学UI设计一点基础“色彩”
- 利用AOP与ToStringBuilder简化日志记录
- 让UILabel根据内容字体的多少,来决定自己的高度
- UILabel 简单创建
- 通过keychain进行保存UUID
- iOS UI测试题
- iOS开发-Alpha,Hidden与Opaque区别
- OSX: QuickLook快速预览不工作?
- UI笔记之UIButton
- LeetCode 51. N-Queens
- 【UE4学习】04——官方教程代码
- easyui datagrid排序问题
- 分组圆角TableView
- HBuilder快捷键
- phoenixframework自动化测试平台webUI代码示例
- 关于UINavigationController自定义实效的问题,和自带效果研究