啓動Android虛擬機的時候Eclipse中出現錯誤

 回到學校宿舍,啓動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 不過這個我沒試過
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章