Xcode运行模拟器黑屏并意外退出

来源:互联网 发布:如何解除网络屏蔽 编辑:程序博客网 时间:2024/04/29 04:00

这两天遇到一个很头疼的问题,在Xcode中新建任意项目,只要一run simulator,Xcode马上意外退出,错误报告如下:


Assertion failed: (out_port != 0), function StartDebugserverProcess, file /SourceCache/lldb/lldb-310.2.37/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp, line 720.


上网查了半天,有说把debugger改成none的,有说重置simulator的,有说删除simulator配置信息的,但是都不起作用。最后终于在Apple官网上找到问题的答案:

https://discussions.apple.com/thread/6100778


原来我之前改过hosts文件,把本地的127.0.0.1给删除了。现在把hosts文件恢复到默认状态,这个问题就修复了!!!


附上默认hosts:

## 
# Host Database 

# localhost is used to configure the loopback interface 
# when the system is booting.  Do not change this entry. 
## 
127.0.0.1       localhost 
255.255.255.255 broadcasthost 
::1             localhost  
fe80::1%lo0     localhost

0 0
原创粉丝点击