Cocoapods最新版本1.2.0引入Alamofire编译有时出错的解决办法
来源:互联网 发布:创业公司 程序员 编辑:程序博客网 时间:2024/06/06 14:08
xcode7.3,
一开始用Cocoapods最新版本1.2.0引入Alamofire编译是完全通过编译和运行的,
指定了版本 pod 'Alamofire','3.5'
后来增删pods文件里的列表,有时就编译不同过了,都是Alamofire的错误,400多个,
从svn上回复回去又是可以编译通过的哦,
执行了pod update或pod install就出现了400多个错误,
找了半天,看链接:具体内容看文章末尾:
Alamofire 4.0, Swift 3 AFError.Swift
在终端执行这句解决问题: pod deintegrate && pod _1.1.1_ install
果然stackoverflow上什么都有
文章内容:
2down votefavorite
Background:
I am relatively new to programming and am updating my current iOS project which uses Alamofire & Swift 3. The project was working fine until I updated to Alamofire ~4.0 which presented me with 530 errors.
I'm opening up the xcworkspaceproject in Xcode8.1
I tried clearing up the problem using the suggestions in this StackOverflow Thread: Alamofire XCode8 Swift 3 results in 786 Compile Errors
including:
gem install cocoapods --pre
and also downgrading the cocoapod version cocoapods-1.2.0.beta.1
from the current beta version down to cocoapods-1.1.1
I also: 1. Deleted the podfile 2. created a new podfile 3. reinstalled all the pods 4.) Clean & Build
Unfortunately none of these worked.
Displayed Errors:
Type 'AFError' does not conform to protocol 'RawRepresentable'
Most of the other of the 530 errors are:
Definition conflicts with previous value
All the errors are contained within the AFError.Swift file (which is locked by default). Thanks for any solution to help in fixing this.
1 Answer
a. Try installing your pods using a stable version after a deintegration:
`pod deintegrate && pod _1.1.1_ install`
b. Try purging DerivedData cache: close Xcode (fully close, like with cmd+q), delete the DerivedData folder, empty the trash. And only re-open Xcode after that last step, to correctly re-build the cache.
- Cocoapods最新版本1.2.0引入Alamofire编译有时出错的解决办法
- 1、出错原因:没有更新到最新的cocoapods版本
- cocoapods 引入Alamofire 各种错误和解决
- 安装最新版本的cocoapods
- swift 关于 CocoaPods引入Alamofire报警告问题
- CocoaPods 0.35.0版本, 出现循环依赖的解决办法
- CocoaPods 0.35.0版本, 出现循环依赖的解决办法
- CocoaPods 0.35.0版本, 出现循环依赖的解决办法
- Xcode8.1 swift3.0 引入Alamofire 3.5.0 支持iOS版本8.0 设置
- 编译最新版本的vlc
- 编译vsftp出错的解决办法
- VS2013编译出错的解决办法
- 编译vsftp出错的解决办法
- 升级cocoapods 0.36.0之后,解决更新的部分依赖库,不是最新版本的问题
- CocoaPods私有仓库获取不到最新版本的pod
- 使用CocoaPods更新第三方库出错的解决办法
- Mac OSX 10.11 安装cocoapods出错的解决办法
- CocoaPods在OS X10.11出错的解决办法
- 将 ICDAR 2015 的 Ground Truth 标注在图像数据上
- csrf攻击原理及防备
- DLL弹出窗口
- JavaScript中的引用类型Function类型学习心得
- Hadoop入门之Hadoop伪分布式环境搭建
- Cocoapods最新版本1.2.0引入Alamofire编译有时出错的解决办法
- 第十五周OJ(8)统计字符串种类
- 微信企业号开发:接收消息和事件
- 堆和栈的异同点
- WEB API 随笔
- swift 协议扩展基础
- javaDynamicComplider
- 汽车的匿名构造
- Oracle11G impdp,empdp导入导出数据库操作流程
Error
, it means your project is still in 2.x version – Rajan MaheshwariDec 6 at 4:23