ios - 没有要编译的体系结构(ARCHS=i386,VALID_ARCHS=arm64 armv7 armv7s)

标签 ios xcode xcodebuild xcode5.1

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

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

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

当我运行它时,我得到: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

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

最佳答案

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

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

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

关于ios - 没有要编译的体系结构(ARCHS=i386,VALID_ARCHS=arm64 armv7 armv7s),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23919970/

相关文章:

ios - Xcode12 - 为 iOS 模拟器构建,但链接为 macOS 构建的目标文件,文件 'dir/SomeFile.a' 用于架构 x86_64

xcode4 - Xcode 4 中的代码签名身份选择中未显示分发配置文件

ios - Controller 之间的导航 - 黑屏

android - 如何从 GridView 中删除内部滚动条?

ios - 比较 UIViewController 实例

ios - google plus iOS 应用程序不注销我

ios - xcodebuild-exportArchive : exportOptionsPlist error for key 'method' : expected one of {}

ios - 为两个选项卡栏项目重用 UIViewController

ios - becomeFirstResponder 在 cellForRowAtIndexPath 中不起作用

iphone - (空): iPad: application executable contains unsupported architecture(s): armv7s (-19031)