xcode 尝试将 iPhone 应用程序安装到我的开发设备上时出现“不正确的架构”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5824316/
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
"Incorrect Architecture" when trying to install iPhone app onto my development device
提问by Bill
I have an iPhone 3G (running iOS 4.0) that I use to performance-test my app on my old hardware. I used to be able to use the device without issue, even with Xcode 4.
我有一部 iPhone 3G(运行 iOS 4.0),用于在旧硬件上对我的应用程序进行性能测试。我曾经能够毫无问题地使用该设备,即使使用 Xcode 4。
Somehow, though, when I installed the latest build of Xcode4 (4.0.2 build 4A2002a) I lost the ability to install my app on this older device. When I press the Run button, I get
然而,不知何故,当我安装最新版本的 Xcode4(4.0.2 版本 4A2002a)时,我无法在这个旧设备上安装我的应用程序。当我按下运行按钮时,我得到
No provisioned iOS devices are available. Connect an iOS device or
choose an iOS simulator as the destination.
However, nothing's changed on the device (my provisioning profile is still installed and valid) and this whole process works fine for my primary device, an iPhone 4.
但是,设备上没有任何变化(我的配置文件仍然安装并且有效)并且整个过程适用于我的主要设备 iPhone 4。
I used the Applications screen in the Organizer to manually install the application onto the phone. This looked more promising, as a progress bar started to fill up and indicated that it was copying files onto the device. However, before finishing, it popped up a message:
我使用管理器中的应用程序屏幕手动将应用程序安装到手机上。这看起来更有希望,因为进度条开始填满并表明它正在将文件复制到设备上。然而,还没完成,就弹出了一条消息:
An unknown error message 'IncorrectArchitecture', was received from the device.
and the app never shows up on the phone.
并且该应用程序永远不会出现在手机上。
My project's deployment target is 3.1.3 and the "Architectures" field in Build Settings is set to "Standard (armv6 armv7)"
我项目的部署目标是 3.1.3 并且 Build Settings 中的“Architectures”字段设置为“Standard (armv6 armv7)”
Is there something I'm missing here? Why won't it install and what changed between the first release of Xcode4 and the second release that could have caused this?
有什么我在这里想念的吗?为什么不安装它,以及在 Xcode4 的第一个版本和可能导致此问题的第二个版本之间发生了什么变化?
回答by Julio Gorgé
In your targetsettings (not project settings), make sure you have:
在你的目标设置(不是项目设置)中,确保你有:
Architectures: Standard (armv6 armv7)
Valid architectures: armv6 armv7
Build Active Architecture Only: No
(though Yes is usually OK in debug builds when you are using a single testing device)
架构:标准(armv6 armv7)
有效架构:armv6 armv7
仅构建活动架构:否
(虽然当您使用单个测试设备时,在调试版本中通常是可以的)