DDMS报错:Failed to initialize Monitor Thread: ......

简介:

    晚上做了个Demo准备用手机调试一下看看效果,结果运行Android程序时,DDMS却给出了这样的错误:

  Failed to initialize Monitor Thread: Unable to establish loopback connection

  此时控制台也不停的输出:

  [2014-02-04 21:54:14 - DeviceMonitor] Connection attempts: 1
  [2014-02-04 21:54:15 - DeviceMonitor] Connection attempts: 2
  [2014-02-04 21:54:16 - DeviceMonitor] Connection attempts: 3
  [2014-02-04 21:54:18 - DeviceMonitor] Connection attempts: 4
  [2014-02-04 21:54:19 - DeviceMonitor] Connection attempts: 5

  。。。。

  我纳闷,昨天还可以正常使用的开发工具,今天突然抽风了。。。

  于是我先Baidu,没效果,后Bing,才搜到几条。其主要处理方法为:

  1,在命令行下输入:netstat -ano | findstr "5037" 看端口是否被占用,如果有结果,则在任务管理器中结束掉这个进程

  2,关闭所有可能使用adb服务的其他应用程序:如酷狗,金山毒霸,QQ管家等可以通过电脑连接手机的软件。

  2,先关闭adb再重启adb服务:命令行进入到Android目录下的tools中,输入adb kill-server和adb start-server

  3,重启Eclipse.

  但是我试过了好多回,还是无用。。。

  另外还有说关闭防火墙的,我试过了也没用。

  最后,在一篇文章里看到这样一句:

  在Eclipse文件夹下的eclipse.ini中,看到有类似下面的字符串:

?
1
2
3
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6

  在其后面加入下面这句(如果eclipse.ini中没有,则这几句一起加入到这个文件的最后):

?
1
-Djava.net.preferIPv4Stack= true

  就这样,重启Eclipse,再次运行Android程序,成功!!

目录
相关文章
|
6月前
|
数据库 数据库管理
【异常解决】svn报“Previous operation has not finished; run ‘cleanup‘ if it was interrupted”的错误解决方案
【异常解决】svn报“Previous operation has not finished; run ‘cleanup‘ if it was interrupted”的错误解决方案
153 0
|
开发工具 Android开发
解决bug:运行项目时报异常 “Can't create handler inside thread that has not called Looper.prepare()”
解决bug:运行项目时报异常 “Can't create handler inside thread that has not called Looper.prepare()”
876 0
|
5月前
|
JavaScript
win10执行npm出现Error: EBUSY: resource busy or locked 错误解决方法
win10执行npm出现Error: EBUSY: resource busy or locked 错误解决方法
win10执行npm出现Error: EBUSY: resource busy or locked 错误解决方法
|
IDE 开发工具
Waiting for another flutter command to release the startup lock... 异常解决
平时我们在开发flutter过程中,在执行`flutter packages get`命令之后,如果运气不好的,命令没有执行成功的话,我们就会遇到这个错误提示: ``` Waiting for another flutter command to release the startup lock... ```
TortoiseSVN报错:“Previous operation has not finished; run 'clean up' if it was interrupted“ 的解决方法
TortoiseSVN报错:“Previous operation has not finished; run 'clean up' if it was interrupted“ 的解决方法
267 0
TortoiseSVN报错:“Previous operation has not finished; run 'clean up' if it was interrupted“ 的解决方法
svn报错:“Previous operation has not finished; run ‘cleanup‘ if it was interrupted“ 的解决办法
svn报错:“Previous operation has not finished; run ‘cleanup‘ if it was interrupted“ 的解决办法
219 0
svn报错:“Previous operation has not finished; run ‘cleanup‘ if it was interrupted“ 的解决办法
|
Python
Python编程:Fatal error in launcher: Unable to create process
Python编程:Fatal error in launcher: Unable to create process
183 0
|
网络协议 Java 容器
【报错】项目启动,仅仅报错 One or more listeners failed to start. Full details will be found in the appropriate container log file
今天spring4.3.13 项目,整合ActiveMQ的时候,项目启动在自动部署到tomcat下的时候,不能正常的部署,仅仅报错如下: Connected to server [2017-12-08 03:57:12,428] Artifact springDemo:war exploded: Artifact is being deployed, please wait.
6164 0