[Solved-4 Solutions] 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



Error Description:

  • After we upgrade the Xcode version, when using external static libraries, we 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)
click below button to copy the code. By - ios tutorial - team

Solution 1:

  • If you want to remove the support for any architecture, for example, ARMv7-s in your case, use menu Project -> Build Settings -> remove the architecture from "valid architectures".
  • You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project, not from the library.
  • Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you ought to upgrade any third-party libraries you're using.

Solution 2:

  • Simply toggle "Build Active Architecture Only" to "Yes" in the target's build settings, and it will be OK now!

Solution 3:

  • Try to remove armv7s from project's "Valid architecture" to release from this issue for iOS 5.1 phone

Solution 4:

  • Use menu Project -> Build Settings -> then remove armv7s from the "valid architectures". If standard has been chosen, then delete that and then add armv7.

Related Searches to 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