ios “警告:iPhone 应用程序应包含 armv6 架构”,即使使用构建配置集
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4198676/
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
"Warning: iPhone apps should include an armv6 architecture" even with build config set
提问by Nick
It's been a while since I've had to adjust project build settings. After upgrading to a recent SDK I'm having trouble building my ad hoc distribution configuration.
自从我不得不调整项目构建设置以来已经有一段时间了。升级到最近的 SDK 后,我在构建临时分发配置时遇到了问题。
Build generates this warning and error:
构建生成此警告和错误:
warning: iPhone apps should include an armv6 architecture (current ARCHS = "armv7")
iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
警告:iPhone 应用程序应包含 armv6 架构(当前 ARCHS = "armv7")
iPhone/iPod Touch:应用程序可执行文件缺少所需的架构。至少以下结构(一个或多个)中的一个必须存在:用于ARMv6(-19033)
However in my project I thought I had things set correctly:
但是在我的项目中,我认为我的设置正确:
- Architectures is: Standard (armv6 armv7)
- Base SDK: Latest iOS (currently set to iOS 4.2)
- Valid Architectures: armv6 armv7
- 架构是:标准(armv6 armv7)
- 基础 SDK:最新的 iOS(目前设置为 iOS 4.2)
- 有效架构:armv6 armv7
I have cleaned all targets.
我已经清理了所有目标。
I appreciate any tips.
我很欣赏任何提示。
回答by Nick
If using Xcode 4.2 or higher, try the following:
如果使用 Xcode 4.2 或更高版本,请尝试以下操作:
Click your Project name (in the left column), followed by the Target:
Click the 'Build Settings' tab (in the right column):
Click the 'Release' or 'Distribution' row under 'Architectures', and choose 'Other...':
Double click the highlighted row named '$(ARCHS_STANDARD_32_BIT)' in the popover that appears, and replace it by typing 'armv6'. Then add a new row with the plus button in the bottom left of the popover, and type 'armv7', then click Done:
单击您的项目名称(在左栏中),然后是目标:
单击“构建设置”选项卡(在右栏中):
单击“架构”下的“发布”或“分发”行,然后选择“其他...”:
在出现的弹出窗口中双击名为“$(ARCHS_STANDARD_32_BIT)”的突出显示行,然后键入“armv6”来替换它。然后在弹出窗口的左下方添加一个带有加号按钮的新行,并输入“armv7”,然后单击“完成”:
Update: you should add armv7s to target the iPhone 5 as well. (And drop armv6 if building with Xcode 4.5 or higher, which no longer supports armv6.)
更新:您还应该添加 armv7s 以针对 iPhone 5。(如果使用不再支持 armv6 的 Xcode 4.5 或更高版本构建,则删除 armv6。)
That's it. You should now be able to build/archive without generating errors.
就是这样。您现在应该能够在不产生错误的情况下构建/归档。
If it still doesn't work, see this answer from justinxreese, which suggests adding entries for armv6 and armv7 under "Required Device Capabilities" in your info.plist file.
如果它仍然不起作用,请参阅justinxreese 的这个答案,它建议在 info.plist 文件的“所需设备功能”下添加 armv6 和 armv7 的条目。
回答by Brian
If you uncheck "Build Active Architecture Only", then it will build all the valid architectures.
如果取消选中“仅构建活动架构”,则它将构建所有有效架构。
Update: This is no longer applicable as of Xcode 4 - follow Nick's instructions for Xcode 4 and later.
更新:从 Xcode 4 开始,这不再适用 - 请按照尼克对 Xcode 4 及更高版本的说明进行操作。
回答by justinxreese
I had this problem even after following the accepted answer and found the following to work:
即使在遵循接受的答案后我也遇到了这个问题,并发现以下方法有效:
In your Info.plist, add an entry for Required Device Capabilities. This should be an array and will have two entries.
在您的 Info.plist 中,为所需的设备功能添加一个条目。这应该是一个数组,将有两个条目。
- Item 0 : armv6
- Item 1 : armv7
- 项目 0:armv6
- 第 1 项:armv7
It will look like this:
它看起来像这样:
回答by MattyG
In addition to Nick's answer about Xcode 4.2, you may also need to review your info.plist file. It seems as if new projects started in Xcode 4.2 by default specify 'armv7' in the 'Required Device Capabilities'. You'll need to remove this if wanting to support devices that run armv6 (e.g. the iPhone 3G).
除了 Nick 对 Xcode 4.2 的回答之外,您可能还需要查看您的 info.plist 文件。似乎默认情况下在 Xcode 4.2 中启动的新项目在“所需设备功能”中指定“armv7”。如果想要支持运行 armv6 的设备(例如 iPhone 3G),您需要删除它。
Delete armv7 from the 'Required device capabilities' in yourProjectName-Info.plist
从 yourProjectName-Info.plist 中的“所需设备功能”中删除 armv7
回答by Animesh
An ios 6 update
一个 ios 6 更新
Changes in Xcode 4.5.x for ios 6
Xcode 4.5.x 中针对 ios 6 的更改
- Xcode 4.5.x (and later) does not support generating armv6 binaries.
- Now includes iPhone 5/armv7s support.
- The minimum supported deployment target with Xcode 4.5.x or later is iOS 4.3.
- Xcode 4.5.x(及更高版本)不支持生成 armv6 二进制文件。
- 现在包括 iPhone 5/armv7s 支持。
- Xcode 4.5.x 或更高版本支持的最低部署目标是 iOS 4.3。
回答by Tom Kincaid
I had this problem too. I just set my deployment target to 4.3 and left only armv7 architecture and it worked. At point almost everyone has 5, so 4.3 is fine.
我也有这个问题。我只是将我的部署目标设置为 4.3 并且只留下 armv7 架构并且它工作正常。现在几乎每个人都有 5 个,所以 4.3 没问题。
回答by mr.octobor
for me it not work with every answer. but I try TARGETS > Architectures > Debug and add a new row with the plus button, and type 'armv6'(with out '), then click Done.
对我来说,它不适用于每个答案。但我尝试 TARGETS > Architectures > Debug 并添加一个带有加号按钮的新行,然后键入“armv6”(不带“)”,然后单击“完成”。
and finally CMD+B and then right click at PrjectName.app(in Products folder) > Open in Finder > Compress "PROJECT_NAME.APP" (in Debug-iphoneos) > Upload to AppStore
最后 CMD+B 然后右键单击 PrjectName.app(在 Products 文件夹中)> 在 Finder 中打开> 压缩“PROJECT_NAME.APP”(在 Debug-iphoneos 中)> 上传到 AppStore
it's my screen setting.
这是我的屏幕设置。
if you have include project please config it all. Hope your help.
如果您有包含项目,请全部配置。希望你的帮助。
回答by Louie
After trying a mixture of these answers, I finally stumbled across making it work. Im so pissed off at Apple right now. Just another hour they made me waste. Here is my config.
在尝试了这些答案的混合之后,我终于偶然发现了它的工作。我现在对苹果很生气。再过一个小时,他们就让我浪费了。这是我的配置。
回答by mbo
I tried all the answers above ,none resolved my question. So I create a new project and diff the build settings one by one. Only "Alternate Permissions Files" is different. The project build failed has a value armv7. Delete it then clean->build->archive . Succeed! Hope can solve you question
我尝试了上面的所有答案,都没有解决我的问题。所以我创建了一个新项目并一一比较构建设置。只有“备用权限文件”不同。项目构建失败的值为 armv7。删除它然后 clean->build->archive 。成功!希望能解决你的问题
回答by Brent
Wow, I update/submit apps about every 6 months. Every time I do this I have to learn the "new" way to do it...
哇,我大约每 6 个月更新/提交一次应用程序。每次我这样做时,我都必须学习“新”的方法来做到这一点......
Same problems as described above when running iOS 5.1, and Xcode 4.3.2
运行 iOS 5.1 和 Xcode 4.3.2 时出现与上述相同的问题
Thanks for the posts! I spent a while updating all of the project settings to armv6, armv7, but no joy. When I set "build active architecture only" to No I got a build error about putting both objects in the same directory.
感谢您的帖子!我花了一段时间将所有项目设置更新为 armv6、armv7,但没有任何乐趣。当我将“仅构建活动架构”设置为“否”时,出现关于将两个对象放在同一目录中的构建错误。
Fortunately, I noticed you guys were modifying the target build settings instead. This is what finally worked (armv6, armv7, and setting "build active architecture only" to No under the Target build Settings). As a disclaimer, I had already set all of the architectures to armv6, armv7 in the project settings too.
幸运的是,我注意到你们正在修改目标构建设置。这就是最终有效的方法(armv6、armv7,并在目标构建设置下将“仅构建活动架构”设置为否)。作为免责声明,我已经在项目设置中将所有架构设置为 armv6、armv7。
Anyway, thanks for the help, Brent
不管怎样,谢谢你的帮助,布伦特