文件不包含armv7切片

时间:2021-01-06 16:54:34

I cannot build and test on devices because Xcode gives me this error:

我无法在设备上构建和测试,因为Xcode给了我这个错误:

ld: file is universal (2 slices) but does not contain a(n) armv7 slice: /Users/------/Desktop/Running APP/------/-----/YACropImage.a file '/Users/------/Desktop/Running APP/------/-----/YACropImage.a' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个解决方案

#1


2  

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".

如果要删除对任何体系结构的支持,例如,在您的情况下使用ARMv7-s,请使用菜单项目 - >构建设置 - >从“有效体系结构”中删除体系结构。

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.

或者,您可以将调试配置的“仅构建活动体系结构”的标志设置为“是”。将发布配置的“仅构建活动体系结构”保留为“否”,这样您就可以在发布之前获得提醒,您应该升级您正在使用的任何第三方库。

#1


2  

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".

如果要删除对任何体系结构的支持,例如,在您的情况下使用ARMv7-s,请使用菜单项目 - >构建设置 - >从“有效体系结构”中删除体系结构。

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.

或者,您可以将调试配置的“仅构建活动体系结构”的标志设置为“是”。将发布配置的“仅构建活动体系结构”保留为“否”,这样您就可以在发布之前获得提醒,您应该升级您正在使用的任何第三方库。