xcode 所选设备指定了不受支持的架构
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24025648/
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
The selected device specifies an unsupported architecture
提问by carbocation
I'm trying to launch an Objective C app built on Xcode5 on Xcode6 beta (Version 6.0 (6A215l)). I get the following message when trying to build for any platform except for iPhone 5s:
我正在尝试在 Xcode6 beta(版本 6.0 (6A215l))上启动基于 Xcode5 的 Objective C 应用程序。尝试为除 iPhone 5s 以外的任何平台构建时,我收到以下消息:
Xcode cannot run using the selected device.
Xcode cannot run using the selected device.
The selected device specifies an unsupported architecture.
The selected device specifies an unsupported architecture.
It's not even obvious how to begin troubleshoting this as I can't get to the point where the console is activated. Any pointers?
如何开始解决这个问题甚至不是很明显,因为我无法到达控制台被激活的地步。任何指针?
回答by Joseph Duffy
I just had this myself.
我自己刚有这个。
I tried a few things (closing simulator before running, having it open, resetting), but what seemed to fix it was a simple clean, build and then run
我尝试了一些事情(在运行之前关闭模拟器,打开它,重置),但似乎修复它的是一个简单的清理,构建然后运行
If that's not it then I have a couple of other things I did but I don't think they were responsible
如果不是这样,那么我做了一些其他的事情,但我认为他们没有责任
回答by SandDepp
I was getting the same issue when the Xcode-> Targets-> General-> Deployment->Devices selected is iPad. but I am going to run this project on iPhone. check your project.
当 Xcode-> Targets-> General-> Deployment-> Devices selected is iPad 时,我遇到了同样的问题。但我要在 iPhone 上运行这个项目。检查您的项目。
回答by Simon Rice
I bumped into this issue after changing the Executable file
field in the info tab of my target settings - changing this back to the default ${EXECUTABLE_NAME}
fixed it for me.
在更改Executable file
目标设置的信息选项卡中的字段后,我遇到了这个问题- 将其更改回默认设置${EXECUTABLE_NAME}
为我修复了它。
回答by Ryan
I was getting the same issue and no amount of cleaning solved it. I had to remove all Swift files from my project. Then I re-added them, but made sure to unselect the "Add to Target" option in the file add dialog. Finally, manually added them to the "Compile Sources" section of your project's "Build Phases". This did it for me. (Also make sure no Swift files end up in the "Copy Bundle Resources" section of Build Phases).
我遇到了同样的问题,没有多少清洁可以解决它。我不得不从我的项目中删除所有 Swift 文件。然后我重新添加了它们,但确保在文件添加对话框中取消选择“添加到目标”选项。最后,手动将它们添加到项目“构建阶段”的“编译源”部分。这为我做到了。(还要确保构建阶段的“复制捆绑资源”部分中没有 Swift 文件)。
回答by Nitesh Borad
- Close simulator if it is opend
- Press Command + shift + k (or clean the project by selecting product menu item from xcode menu) and then press Command + r (or run the project)...
- 如果模拟器打开则关闭模拟器
- 按 Command + shift + k (或通过从 xcode 菜单中选择产品菜单项来清理项目),然后按 Command + r (或运行项目)...