xcode 没有要编译的架构(ARCHS=i386,VALID_ARCHS=arm64 armv7 armv7s)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23919970/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:57:41  来源:igfitidea点击:

No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s)

iosxcodexcodebuildxcode5.1

提问by heinst

Preface:I did look at similar questions and none of the answers seemed to fix my problem.

前言:我确实看过类似的问题,但似乎没有一个答案能解决我的问题。

I am trying to build my xcode (version 5.1.1) project using:

我正在尝试使用以下方法构建我的 xcode(版本 5.1.1)项目:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "armv7s" ONLY_ACTIVE_ARCH=NO,

xcodebuild clean build -sdk iphonesimulator7.0 -arch "armv7s" ONLY_ACTIVE_ARCH=NO,

when I run this I get: No architectures to compile for (ARCHS=armv7s, VALID_ARCHS=i386 x86_64)as an error. I tried the above command with all of the VALID_ARCHS (rm64 armv7 armv7s) as inputs. So I then tried running this command:

当我运行它时,我得到:No architectures to compile for (ARCHS=armv7s, VALID_ARCHS=i386 x86_64)作为一个错误。我尝试使用所有 VALID_ARCHS (rm64 armv7 armv7s) 作为输入的上述命令。所以我然后尝试运行这个命令:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO

xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO

and I then get No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s)as an error. I tried running the above command with all the other VALID_ARCHS (i386 x86_64) and no luck with that either. I don't know why these architecture errors are occurring. I have cocoapods in my project, and the first answer in the link above didn't fix my issue.

然后我得到No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s)一个错误。我尝试使用所有其他 VALID_ARCHS (i386 x86_64) 运行上述命令,但也没有运气。我不知道为什么会发生这些架构错误。我的项目中有 cocoapods,上面链接中的第一个答案没有解决我的问题。

回答by Sath89

You can override your default variables: Try to use this:

您可以覆盖默认变量:尝试使用:

xcodebuild clean build -sdk iphonesimulator7.0 -arch "i386" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64"

If you building for Simulator - always build for i386/x86_64.

如果您为模拟器构建 - 始终为 i386/x86_64 构建。

回答by Eduardo Irias

Go to your project settings (not targets). Then open Build Settings and add a value to Valid architectures: i386

转到您的项目设置(不是目标)。然后打开 Build Settings 并为Valid architectures添加一个值:i386