xcode iOS - 文件不包含 armv7s 切片
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12737736/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS - file does not contain an armv7s slice
提问by soleil
I cannot build and test on devices because Xcode gives me this error:
我无法在设备上构建和测试,因为 Xcode 给了我这个错误:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /.../Classes/AddThis/libAddThis.a for architecture armv7s
How do I update this library to support armv7s?
如何更新此库以支持 armv7s?
回答by Allen
Try setting the Build Active Architecture Only to 'YES' in the Project Build settings.
尝试在 Project Build 设置中将 Build Active Architecture Only 设置为“YES”。
回答by Edwin Iskandar
libAddThis.a needs to be built for the armv7s architecture. If you don't have control over this then you will need to remove armv7s from valid architectures as you did.
需要为 armv7s 架构构建 libAddThis.a。如果您对此没有控制权,那么您将需要像您一样从有效架构中删除 armv7。
回答by Code Hunter
I did this by changing valid architecture from build setting. I am attaching a screenshot for your help.
我通过从构建设置更改有效架构来做到这一点。我附上截图以供您参考。
Thanks, Cp
谢谢,cp
回答by Caleb
Add armv7s
to the Valid Architectures setting in the Build Settings for the library's project/target.
添加armv7s
到库项目/目标的构建设置中的有效架构设置。