尝试从 Xcode 在 iPhone 4S 上运行我的应用程序时出现“此应用程序不支持此设备的 CPU 类型”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19973897/
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
Got "This application does not support this device's CPU type" trying to run my application on iPhone 4S from Xcode
提问by esilin
The application is built for armv7 architecture. I double checked binary header, and it contains 12 for CPU type and 9 for CPU subtype. The application runs well on iPhone 5 but fails on iPhone 4S or iPad Mini. Both have iOS 7.0.3 installed. Xcode version 5.0. There are no specific processor requirements in plist. See device console log below. Any ideas?
该应用程序是为 armv7 架构而构建的。我仔细检查了二进制头,它包含 12 个 CPU 类型和 9 个 CPU 子类型。该应用程序在 iPhone 5 上运行良好,但在 iPhone 4S 或 iPad Mini 上运行失败。两者都安装了 iOS 7.0.3。Xcode 5.0 版。plist 中没有特定的处理器要求。请参阅下面的设备控制台日志。有任何想法吗?
Nov 14 13:09:42 iPhone-4S installd[62] : 0x25d000 file_matches_my_arch: Can't map input file: /var/tmp/install_staging.7IZ38C/xxxx.app/xxxx
11 月 14 日 13:09:42 iPhone-4S 安装 [62]:0x25d000 file_matches_my_arch:无法映射输入文件:/var/tmp/install_staging.7IZ38C/xxxx.app/xxxx
Nov 14 13:09:42 iPhone-4S installd[62] : 0x25d000 do_preflight_verification: Incorrect architecture at /var/tmp/install_staging.7IZ38C/xxxx.app
11 月 14 日 13:09:42 iPhone-4S 安装 [62]:0x25d000 do_preflight_verification:/var/tmp/install_staging.7IZ38C/xxxx.app 的架构不正确
Nov 14 13:09:42 iPhone-4S mobile_installation_proxy[138] : 0x181000 MobileInstallationInstallForLaunchServices: failed with -1
11 月 14 日 13:09:42 iPhone-4S mobile_installation_proxy[138]:0x181000 MobileInstallationInstallForLaunchServices:失败,-1
Nov 14 13:09:42 iPhone-4S installd[62] : 0x25d000 install_application: Could not preflight application install
11 月 14 日 13:09:42 iPhone-4S 安装 [62]:0x25d000 install_application:无法预检应用程序安装
Nov 14 13:09:42 iPhone-4S mobile_installation_proxy[138] : ERROR: MobileInstallationInstallForLaunchServices returned nil
11 月 14 日 13:09:42 iPhone-4S mobile_installation_proxy[138]:错误:MobileInstallationInstallForLaunchServices 返回 nil
Nov 14 13:09:42 iPhone-4S mobile_installation_proxy[138] : 0x181000 handle_install: Installation failed: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x15d3fc90 {Error=IncorrectArchitecture}
11 月 14 日 13:09:42 iPhone-4S mobile_installation_proxy[138]:0x181000 handle_install:安装失败:错误域=LaunchServicesError Code=0“操作无法完成。(LaunchServicesError 错误 0。)” UserInfo=0x15d3fc90 {Error=不正确的架构}
Nov 14 13:09:42 iPhone-4S installd[62] : 0x25d000 handle_install_for_ls: API failed
11 月 14 日 13:09:42 iPhone-4S 安装 [62]:0x25d000 handle_install_for_ls:API 失败
回答by MungoRae
I'm not sure about Xcode 5 but in Xcode 4 you have to make sure you have armv6
set as well.
我不确定 Xcode 5,但在 Xcode 4 中,您必须确保也已armv6
设置。
See: Why am I seeing "This application does not support this device's CPU type"?
回答by JonEasy
Rebuilding the ipa (Xcode 6, same build configuration) solved this problem for me. Seems like a bug within the build process to me.
重建 ipa(Xcode 6,相同的构建配置)为我解决了这个问题。对我来说似乎是构建过程中的一个错误。