xcode 模拟器没有出现 - 可以重新安装吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27338042/
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
xcode simulator not coming up - reinstall possible?
提问by zolio
I ran out of disk space and had to clean up the folders on my hard disk. After the cleanup, when I run Xcode, the simulator is not coming up. I am not able to select a simulator to run, on Xcode. Most likely I deleted some folder required by simulator, in my cleanup. Xcode runs onto the device correctly. Anybody came across such a situation?
我的磁盘空间不足,不得不清理硬盘上的文件夹。清理后,当我运行 Xcode 时,模拟器没有出现。我无法在 Xcode 上选择要运行的模拟器。很可能我在清理过程中删除了模拟器所需的一些文件夹。Xcode 正确运行到设备上。有人遇到过这样的情况吗?
I deleted my Xcode and re-installed, but that did not solve the issue. As I can see, Simulator is a separate application (since we can close simulator without closing the Xcode). Is it possible to re-install Simulator alone? Or any other solution to get back my IOS simulator?
我删除了我的 Xcode 并重新安装,但这并没有解决问题。正如我所见,模拟器是一个单独的应用程序(因为我们可以在不关闭 Xcode 的情况下关闭模拟器)。是否可以单独重新安装模拟器?或者任何其他解决方案来找回我的 IOS 模拟器?
I know this is not a programming question, still hope can be posted here. Thanks in advance.
我知道这不是一个编程问题,仍然希望可以在这里发布。提前致谢。
回答by iCMS
I was able to delete my simulator devices and re-install them by following this excerpt written for a user that was missing their simulator:
按照为缺少模拟器的用户编写的摘录,我能够删除我的模拟器设备并重新安装它们:
Open the Xcode > Open Developer Tool > iOS Simulator menu (if you get a pop up error just dismiss it). Once in the Simulator go to Hardware > Device > Manage Devices. Delete everything listed under simulator. Reboot your machine. After that navigate back to Manage Devices in the simulator and click the plus to add back your simulators. Then the iOS 8 simulators will show up. Hope that also helps you.
打开 Xcode > Open Developer Tool > iOS Simulator 菜单(如果出现弹出错误,只需关闭它)。进入模拟器后,转到硬件 > 设备 > 管理设备。删除模拟器下列出的所有内容。重新启动您的机器。之后导航回模拟器中的管理设备,然后单击加号以添加回您的模拟器。然后将显示 iOS 8 模拟器。希望也能帮到你。
Here is where it came from: http://www.reddit.com/r/iOSProgramming/comments/2b9j2p/xcode_6_missing_ios_8_simulator/
这是它的来源:http: //www.reddit.com/r/iOSProgramming/comments/2b9j2p/xcode_6_missing_ios_8_simulator/
回答by Paul King
This will delete all simulator info and get you back to the point where you can use Xcode/Preferences/Components to re-download the simulators and start from scratch:
这将删除所有模拟器信息并让您回到可以使用 Xcode/Preferences/Components 重新下载模拟器并从头开始的点:
- Quit Xcode, Simulator, Instruments, etc.
- Run in Terminal:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
- Run in Terminal:
sudo rm -rf ~/Library/*/CoreSimulator
- 退出 Xcode、模拟器、仪器等。
- 在终端运行:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
- 在终端运行:
sudo rm -rf ~/Library/*/CoreSimulator
Thanks to Apple Dev Forum response https://forums.developer.apple.com/thread/13718
感谢 Apple Dev Forum 的回应https://forums.developer.apple.com/thread/13718