File is universal (three slices), but it does not

2019-01-02 16:27发布

I upgraded Xcode version and when using external static libraries, I get this message:

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to bypass this and add support to the library if the developer of the library hasn't updated their library yet?

8条回答
只靠听说
2楼-- · 2019-01-02 17:15

use menu Project -> Build Settings ->

then remove armv7s from the"valid architectures". If standard has been chosen then delete that and then add armv7.

查看更多
梦醉为红颜
3楼-- · 2019-01-02 17:19

In case this happens to someone. I built my own library to use with a third party code. While I was building it to deliver, I accidentally left my iPhone 4S plugged in, and so Xcode built my library only for the plugged architecture instead of following the project settings. Remove any plugged in devices and rebuilt the library, link it, and you should be all right.

Hope it helps.

查看更多
登录 后发表回答