您的位置:首页 > 其它

Xcode "The selected destination does not support the architecture " 错误

2013-01-19 21:04 483 查看
升级了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." 错误。

在网上搜索半天找不到好的解决方式,即便是stackoverflow上。折腾了半天,最后换了关键词搜索,总算找到一个还算靠谱的解决方案,记下来希望能帮看到的哥们节省点时间。

文章地址在:http://hiediutley.com/2011/03/10/xcode4-is-your-old-project-hanging-in-the-simulator/

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

简单译一译:

如果你有同样的问题,那么删除项目中所有的跟你的userid有关的文件也许能让你启动它。

怎样删除用户指定的项目文件呢?

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

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

3、执行这个命令:find . -name ‘*yourUserName*’ (注:把yourUserName替换成你的用户名就行啦)

4、删除列出的文件。比如,我执行完find后出现如下文件:

./project.xcworkspace/xcuserdata/kevin.xcuserdatad

./xcuserdata/kevin.xcuserdatad

于是我用rm -rf ./project.xcworkspace/xcuserdata/kevin.xcuserdatad 一个个把它们干掉。

4、把xcode关掉(command+q彻底退出啊。。记得),然后重开。*希望*能运行吧。不行就只能再google了。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐