您的位置:首页 > 编程语言 > Java开发

启动Android虚拟机的时候Eclipse中出现错误

2012-07-21 16:09 801 查看
回到学校宿舍,启动Android虚拟机的时候Eclipse中出现如下错误:
[2012-04-13 23:50:19 - ddms]Failed to reopen debug port for Selected Client to: 8700
[2012-04-13 23:50:20 - ddms]Address family not supported by protocol family: bind
java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at com.android.ddmlib.MonitorThread.reopenDebugSelectedPort(MonitorThread.java:716)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:226)

[2012-04-13 23:50:56 - ddms]Can't bind to local 8600 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8601 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8602 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8603 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8604 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8605 for debugger
[2012-04-13 23:50:56 - ddms]Can't bind to local 8606 for debugger

原来是我的hosts文件中指定了
::1 localhost
行头加#注释掉就没事了,具体原因不太清楚,只知道之前在非ipv6环境下是不会出错的,而在校园网的ipv6环境下就有这个问题。

如果不行,再在配置文件里加上

127.0.0.1 localhost  即可。 windows下面:hosts file can be found from c:\windows\system32\drivers\etc\hosts  linux下面的话: /etc/hosts 不过这个我没试过
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐