无法在模拟器中停止 Xcode 应用程序执行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14308352/
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
Can't stop Xcode app execution in simulator?
提问by Jay Imerman
Has anyone seen this before? Ever since I upgraded to Xcode 4.5.2, sometimes when I press Command-R to run an app in the simulator, the status in Xcode says "Running", but the app never starts in the simulator. When I press Command-., it says it is trying to stop, but never stops. Xcode basically is hung, I have to force quit. Hopefully there is a simple solution?
有没有人见过这个?自从我升级到 Xcode 4.5.2 后,有时当我按 Command-R 在模拟器中运行应用程序时,Xcode 中的状态显示为“正在运行”,但该应用程序从未在模拟器中启动。当我按下 Command-. 时,它说它正在尝试停止,但从未停止。Xcode 基本上是挂了,我不得不强制退出。希望有一个简单的解决方案?
采纳答案by Jay Imerman
This tends to work. I use Serge's find to click the icon in the dock - this then "wakes up" XCode to the fact that it needs to attach to the app in the simulator. Even though the attach never happens, a Command-Period at this point stops XCode without hanging it and having to do a Force Quit. Then, I can close down the Simulator, and do Command-R to run from XCode. This relaunches the simulator and attaches to the app process.
这往往有效。我使用 Serge 的 find 单击 Dock 中的图标 - 然后“唤醒”XCode 到它需要附加到模拟器中的应用程序的事实。即使附加从未发生,此时命令期间停止 XCode 而不挂起它并且必须执行强制退出。然后,我可以关闭模拟器,并执行 Command-R 从 XCode 运行。这将重新启动模拟器并附加到应用程序进程。
回答by Tony
Try opening the simulator and deleting the application. Also try closing and re opening xcode. If this does not try restarting your computer. If you are still having the problem then you will have to uninstall xcode and reinstall it. (I have had that problem multiple times)
尝试打开模拟器并删除应用程序。还可以尝试关闭并重新打开 xcode。如果这没有尝试重新启动您的计算机。如果问题仍然存在,则必须卸载 xcode 并重新安装。(我多次遇到这个问题)
回答by buildc0de
Strange, but works. Click on the 'iOS Simulator' icon in the Dock (https://stackoverflow.com/a/10277189/1514970).
奇怪,但有效。单击 Dock 中的“iOS 模拟器”图标 ( https://stackoverflow.com/a/10277189/1514970)。