No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).

来源:互联网 发布:索尼dpt s1 淘宝 编辑:程序博客网 时间:2024/06/05 13:24

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).

问题描述:
这里写图片描述
看懂了英文你就解决了这个问题。
EDIT:

As far as I know (please point it out if there’s something wrong, thanks), if you set ONLY_ACTIVE_ARCH to YES, it means the Xcode will only build for the active architecture (which refers to the device that’s active in Xcode currently). Seems Xcode’s default setting is set Debug to YES, so it won’t build binaries for other architectures when you only want to build for a special device that connected to your Mac.

The reason failed to build might be that, the project does not support the architecture of the device you connected. So the best solution is to add the right architecture for your device. Below is a list for architectures & the devices that support:

ARMv8/ARM64: iPhone 6, iPhone 5s, iPad Air, Retina iPad MiniARMv7s: iPhone 5, iPhone 5c, iPad 4ARMv7: iPhone 3GS, iPhone 4, iPhone 4S, iPod 3G/4G/5G, iPad, iPad 2, iPad 3, iPad MiniARMv6: iPhone, iPhone 3G, iPod 1G/2G

So why “set the ONLY_ACTIVE_ARCH to NO” works? Because the device can still run the binary that built for all architectures you added (pass the build), but will lose some performance. This’s just a quick solution, but not best.

Note: The more architectures you added, the bigger the binary will be generated. So it’s good to choose right architectures for your project. ;)
在这里我想说英文很重要!解决问题还是需要栈溢出啊…
Stack Overflow 我看行!!

0 0
原创粉丝点击