日期:2014-05-16  浏览次数:20449 次

android中The connection to adb is down,问题和解决

自己总结的在android中常会出现的不好解决的问题和方法
(其中第三个方法经过了四天的折磨。。。。。哎)

1.报错:
BUILD FAILED
D:\workspace\ganji\build.xml:144: The following error occurred while executing this line:
D:\workspace\ganji\build.xml:271: Unable to delete file D:\workspace\ganji\tmp\proguard\tmp.jar
解决:
已经开了一个模拟器了,无法重新编译,必须关闭一个。用于ant


2.报错:
The connection to adb is down, and a severe error has occured.
这个问题谁能解决啊
解决:
cmd跳到sdk tools文件路径下
adb kill-server
然后再adb start-server

3.报错:
The connection to adb is down, and a severe error has occured. 
[2010-03-11 09:36:56 - HelloOPone] You must restart adb and Eclipse. 
[2010-03-11 09:36:56 - HelloOPone] Please ensure that adb is correctly located at 'D:\OPhoneSDK_1.5
\platform-tools\adb.exe' and can be executed. 
解决:
方法1.cmd中adb kill-server,然后adb -startserver
方法2.方法1不管用,那么在任务管理器中杀死adb.exe,然后重启Eclipse。
方法3.方法1和2都不管用,那么查看最后一句报错中:platform-tools中是否有adb.exe(我的错误就是在相关路径下面没有platform-tools文件夹
,所以我选择新建一个文件夹,并且把tools中的文件全部复制到platform-tools中)

4.前面是别人总结的方法,我自己碰到的一种情况是“豌豆荚”或“手机助手”类的软件占用了adb,在任务管理器中停止“豌豆荚”及adb后重启adb或eclipse即可。

5.前面的方法试了还是不行的话,建议重新装一个系统,最好换个系统。有些大牛也说过:MS存在一些小问题[size=large][/size]


1、网络上的方法是否都试过了,如果不行,看你是否安装了360安全卫士;
2、如果安装了360,360也有个adb.exe进程,所以eclipse的adb.exe无法启动,导致调试时adb连接不上。先关闭360安全卫士,第一次run,启动adb.exe后,再启动360安全卫士,就不会有问题了。 


我的解决方法:eclipse和模拟器都关闭,重启eclipse,Run Configuration->Target  一开始Manual默认选中 不是灰的, 选中Automatic 再选Manual,Manual变灰 run运行,选择模拟器。模拟器正常了