No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv...

打开老版本程序时,运行报错"No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s arm64)"。因为该版本程序是在Xcode升级前编写的,难免会碰到各种问题。根据提示我们知道是因为缺少了x86_64架构,所以只要补全它就行了。


img_1.png

1.切换到工程里的"TARGETS",选择“Build Settings”选项;


img_2.png

2.在“Search”处输入“ VALID_ARCHS”,定位到“ VALID_ARCHS”;
3.这里又有两种方式可以解决

方法一:双击右边的内容(例如下图的:“armv7 armv7s xxxx”),在弹出框补全x86_64
方法二:单击选中“ VALID_ARCHS”项,点击键盘“delete”项直接删除整项


img_3.png

4.重新运行程序即可。

你可能感兴趣的:(No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv...)