“Failed to initialize Monitor Thread: Unable to establish loopback connection” after running Eclipse

て烟熏妆下的殇ゞ 提交于 2020-01-11 03:34:25

问题


I have a problem, when I want to start developing applications for android, I did everything like in manual here but after installing ADT Plugin in Eclipse I am still getting this error :

[2011-12-29 14:34:56 - ddms] Failed to initialize Monitor Thread: Unable to establish loopback connection

then, if I try to run an application this appear :

[2011-12-29 14:41:42 - TestApp] ------------------------------ [2011-12-29 14:41:42 - TestApp] Android Launch! [2011-12-29 14:41:42 - TestApp] Connection with adb was interrupted. [2011-12-29 14:41:42 - TestApp] 0 attempts have been made to reconnect. [2011-12-29 14:41:42 - TestApp] You may want to manually restart adb from the Devices view.


回答1:


No need to turn off tredo interface: simply add -Djava.net.preferIPv4Stack=true in eclipse.ini:

 openFile
-vmargs
-Djava.net.preferIPv4Stack=true



回答2:


The solution is simple : turn off Teredo Tunneling Pseudo-Interface.

This probably converts IP4 to IPv6 addresses or something, resulting in an IPv6 address for your localhost (strange though, that a PING still results in IP4). Anyway, turning it off (Device manager > View > Show hidden devices > right click on Teredo > disable) solves the problem!

I found out by doing a ipconfig /all in the NON working situation. It showed :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface

Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fb:####:###:####:####(Preferred)

Link-local IPv6 Address . . . . . : fe80::3c47:###:####:#### (Preferred)



来源:https://stackoverflow.com/questions/8668601/failed-to-initialize-monitor-thread-unable-to-establish-loopback-connection-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!