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

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

问题描述

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

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:

  • 模拟器上的应用程序...如果这是不可能的,因为你不能到达主屏幕,可以直接在下面删除App~/Library/Application Support/iPhoneSimulator/6.0/Applications
  • 删除管理器中项目下的派生数据或直接删除在 ~/Library/Developer/Xcode/DerivedData
  • 通过在菜单栏中选择产品"来清理构建文件夹,然后单击在清理构建文件夹"上按 Alt 键时
  • 重启 Xcode

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

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