Xcode编译我的应用程序,但无法在模拟器中运行它 [英] Xcode compiles my App, but can't run it in the simulator

查看:156
本文介绍了Xcode编译我的应用程序,但无法在模拟器中运行它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译我的应用程序时,Xcode只是说附加到Projectname ...并被卡在那里。
调试器只打印出来:

when i compile my app, Xcode just says "Attaching to Projectname..." and gets stuck there. The debugger just prints this out:


错误:无法附加到进程ID 0

error: failed to attach to process ID 0

我试图清理&再次构建,它仍然没有成功。我用谷歌搜索,但找不到任何有用的东西。
我该如何解决这个问题?谢谢!

I tried to clean & build again and it still doesn't work out. I googled but couldn't find anything helpful. How can I fix this problem? Thank You!

推荐答案

我的解决方案是删除Xcode之前生成的所有内容:

The solution for me was to delete everything Xcode has generated earlier:


  • 模拟器上的应用程序...如果由于你不能通过
    到达主屏幕而无法做到这一点,你可以直接在
    <$下删除应用程序c $ c>〜/ Library / Application Support / iPhoneSimulator / 6.0 / Applications

  • 删除项目组织者中的派生数据或直接
    in 〜/ Library / Developer / Xcode / DerivedData

  • 通过在MenuBar中选择Product来清理Build文件夹,然后点击
    按清洁构建文件夹上的Alt键时

  • 重新启动Xcode

  • the App on the Simulator...if this is not possible because you cant reach the Homescreen, you can delete the App directly under ~/Library/Application Support/iPhoneSimulator/6.0/Applications
  • delete the Derived Data in the Organizer under Projects or directly in ~/Library/Developer/Xcode/DerivedData
  • clean the Build Folder by choosing "Product" in the MenuBar and click while you press the Alt-key on "Clean Build Folder"
  • Restart Xcode

这篇关于Xcode编译我的应用程序,但无法在模拟器中运行它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆