XCODE编译运行项目后,发现工程编译后无法运行,出现:
"The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software." 错误。

首先,出现该问题一般是在
${PROJECT_NAME}.xcodeproj目录的相关文件的问题,像xcschemes/xcschememanagement.plist

If you are having the same problem — deleting all the Xcode4 project data with your userid may get you up and running again…
How to go about deleting the user-specific project data
In terminal – navigate to your project directory
cd into the ${PROJECT_NAME}.xcodeproj directory
run this command: find . -name ‘*yourUserName*’
rm -rf any files or dirs that come up
Reopen Xcode4 – build and *hopefully* run your project

解决方法步骤如下:

1、在命令行中cd到你的工程文件夹下

2、cd进xcode 项目的文件夹,大致格式是:${PROJECT_NAME}.xcodeproj (注: 每一个xcode 项目其实是一个文件夹。。你如果右键点击项目文件会发现一个属性叫:show package content,其实就是浏览它的内容。。)

3、进入yourname.xcuserdatad/xcschemes 后将xcschememanagement.plist 目录删除

  1. rm -rf ./project.xcworkspace/xcuserdata/"用户名".xcuserdatad
  2. rm -rf ./xcuserdata/"用户名".xcuserdatad
  1. rm -rf ./project.xcworkspace/xcuserdata/xcschemes/xcschememanagement.plist

4、把xcode关掉(command+q彻底退出啊。。记得),然后重开。*希望*能运行吧。不行就只能再google了。。

还有另一种可能原因是,出现有以下类似警告的错误提示,造成上述错误弹出窗口出现:

[WARN]Warning: Multiple build commands for output file /Developer/build/Release-iphonesimulator/

target引用了名字重复的资源

找到当前的target,展开之后,找到Copy Bundle Resources栏目,然后在里面找到重复名字的资源或本身没资源但此处确有文件的扩展名为.plist和png的文件一一移除,删除不要的那个即可

Command+Q退出重新打开工程项目即可

本文转载至  http://blog.csdn.net/lgm252008/article/details/9171109

解决Xcode "The selected destination does not support the architecture " 错误错误的更多相关文章

  1. 解决xcode升级之后安装的插件失效

    title: 解决xcode升级之后安装的插件失效date: 2015-08-23 11:07:53categories: 编辑工具 tags: xcode 我的博客:http://daycoding ...

  2. Cocos2d-x 坑之二:目录改动后, cannot run on the selected destination

    1:2dx开发中,目录改动后,经常会碰到这个提示错误:  cannot run on the selected destination 解决方法:一般是因为 Info.plist文件属性问题,把 Ta ...

  3. 解决Xcode 9.2系统真机测试时出现 could not find developer disk image问题

    解决Xcode在ipad/iphone 9.2 系统真机测试时出现could not find developer disk image问题 第一种方法:拷贝这个文件(http://download. ...

  4. 【axc】关于duplicate symbols for architecture x86_64错误的第三种可能及其解决办法

    今天分析一下duplicate symbols for architecture x86_64错误  也是困扰我一段时间   不过很幸运 在半个小时内找到了解决方案 百度上对于duplicate sy ...

  5. xcode引入第三方静态类库 duplicate symbol _OBJC_XXX 重复编译错误

    xcode引入第三方静态类库 duplicate symbol _OBJC_XXX 重复编译错误 一:场景 xcode 同时引入了 libA.a, libB.a 两个静态类库,如果 这两个静态类库之中 ...

  6. Undefined symbols for architecture armv7错误解决方法

    Undefined symbols for architecture armv7: "_OBJC_CLASS_$_BriefMainModel", referenced from: ...

  7. 关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结

    关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结 第一,有的人用了破解文件lice ...

  8. IIS上部署MVC网站,打开后ExtensionlessUrlHandler-Integrated-4.0解决方法IIS上部署MVC网站,打开后500错误

    IIS上部署MVC网站,打开后ExtensionlessUrlHandler-Integrated-4.0解决方法 IIS上部署MVC网站,打开后500错误:处理程序“ExtensionlessUrl ...

  9. 解决php configure: error: Cannot find ldap libraries in /usr/lib.错误

    解决php configure: error: Cannot find ldap libraries in /usr/lib.错误 iitshare 分类:Linux,PHP,项目实施 | 标签:Ca ...

随机推荐

  1. 在centos中安装mangodb

    1.下载完安装包,并解压 tgz(以下演示的是 64 位 Linux上的安装) curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_6 ...

  2. Curved UI - VR Ready Solution To Bend Warp Your Canvas 1.7,1.8,2.2,2.3 四种版本压缩包(Unity UGUI曲面插件),可以兼容VRTK

    Curved UI - VR Ready Solution To Bend Warp Your Canvas 1.7,1.8,2.2,2.3 四种版本压缩包(Unity UGUI曲面插件) 可以兼容V ...

  3. 【WPF】给UserControl引入多个资源

    问题:为了方便资源的复用,我们通常会把资源单独抽取为一个资源文件,供其他文件引用.而用户自定义控件UserControl中经常需要引入多个资源文件.而在XAML中由于标签UserControl.Res ...

  4. vshare

    vshare 基于百度分享开发的支持VUE2.X的分享插件,为您带来更多的流量!提供多种风格按钮,代码加载更快,引入社会化流量,提升网页抓取速度等优点.github地址:https://github. ...

  5. [状态机]嵌入式设计模式:有限状态自动机的C语言实现

    转自:http://www.cnblogs.com/autosar/archive/2012/06/22/2558604.html 状态机模式是一种行为模式,在<设计模式>这本书中对其有详 ...

  6. pthread_testcancel和pthread_cancel函数的简单示例

    /*0.取消线程 int pthread_cancel(pthread_t thread); 设置取消点 void pthread_testcancel(void); 测试是否接收到取消请求,如果有, ...

  7. mysql 函数模拟序列

    mysql本身不提供序列机制,但是可以通过函数来模拟实现序列 CREATE TABLE IF NOT EXISTS `sequence` ( `id` ) CHARACTER SET utf8 COL ...

  8. 纯CSS实现圆角、可拖动的一个DIV模块层

    <style>body{ margin:0px; padding:0px; font-size:14px;}#t { position:absolute; float:left; left ...

  9. 关于Unity中stretch的分开使用、预制体、Scroll View的UI节点

    一.上次讲的菊花的四个花瓣,只讲了四个花瓣和在一起的时候的作用,现在是分开的菊花的四个花瓣的作用 1.创建一个Canvas2.对Canvas进行初始化3.创建一个Image的UI节点作为Canvas的 ...

  10. 【转】MFC 之CEvent

    event是用来同步不同线程的.一旦一个线程结束了自己对全局资源的使用,他通过调用SetEvent通知别人可以使用了.如果这个被删了,其他线程将被阻塞 当一个线程里调用了::WaitForSingle ...