Alamofire4迁移,Apple Mach-O链接器(id)错误 [英] Alamofire4 migration, Apple Mach-O Linker (id) Error

查看:111
本文介绍了Alamofire4迁移,Apple Mach-O链接器(id)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在花了几周时间将所有Alamofire代码迁移到AF4 / Swift3之后,我终于解决了由于Alamofire函数更改而导致的所有编译器错误,但是现在当我尝试构建A时,遇到了很多这些Apple Mach-O错误。

After spending weeks migrating all my Alamofire code to AF4/Swift3, I finally fixed all the complier errors due to Alamofire Function changes, but now when I try to build a I get a whole bunch of these Apple Mach-O errors.

其中至少有29个,并且它们中都装有Alamofire或AlamofireImage(除了最后一个是链接器命令失败,退出代码为1)。我不知道在这里做什么,我会发布任何所需的额外信息,有人可以在这里帮助我吗?

There's at least 29 of them and they all have either Alamofire or AlamofireImage in them (aside from the last one which is "Linker command failed with exit code 1"). I don't have a clue of what to do here, I'll post any extra info needed, can anyone help me out here?

编辑:这是第一个3错误,我只复制了红色突出显示的部分。如果有必要,我会发布完整的日志,但是它很大。也许这足以使人们弄清楚发生了什么,如果没有,请告诉我!

edit: Here are the first 3 errors, I copied only the parts highlighted in red. I will post the full log if necessary but its huge. Maybe this is enough for someone to figure out what's going on, if not, let me know!

所有错误都在架构arm64的未定义符号下:

  "Alamofire.DataRequest.validate <A where A: Swift.Sequence, A.Iterator.Element == Swift.Int> (statusCode : A) -> Self", referenced from:

-

"Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 1)", referenced from:

-

"Alamofire.(upload (multipartFormData : (Alamofire.MultipartFormData) -> (), usingThreshold : Swift.UInt64, to : Alamofire.URLConvertible, method : Alamofire.HTTPMethod, headers : [Swift.String : Swift.String]?, encodingCompletion : (Alamofire.SessionManager.MultipartFormDataEncodingResult) -> ()?) -> ()).(default argument 1)", referenced from:


推荐答案

所以对我来说,窍门至少不是清理构建,而是清理构建文件夹。在Xcode中打开产品菜单下拉菜单并按住Option,然后清理变成清理构建文件夹

So the trick for me at least isn't to clean build, but to "Clean Build Folder". Open the Product menu drop down in Xcode and hold Option, and "Clean" turns into "Clean Build Folder"

这篇关于Alamofire4迁移,Apple Mach-O链接器(id)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆