android 异常问题解决

在android的学习过程中,经常碰到一些诡异问题,苦恼啊,总结一些问题和解决方法,有的参考其他人的blog,希望能坚持持续更新。

 

1.报错:

BUILD FAILED

D:\workspace\cashcat\build.xml:144: Thefollowing error occurred while executing this line:

D:\workspace\cashcat\build.xml:271: Unableto delete file D:\workspace\cashcat\tmp\proguard\tmp.jar

解决:

已经开了一个模拟器了,无法重新编译,必须关闭一个。

 

 

2.报错:

The connection to adb is down, and a severeerror has occured.

这个问题总是碰到

解决:

cmd跳到sdk\platform-tools文件路径下

adb kill-server

然后再adb start-server

 

3.报错:

adb server is out of date

 

分析:出错的原因是adb的端口被其他程序的进程占领了,所以要做的就是找到并kill该进程

cmd中执行adb nodaemon server,查看adb的端口号是多少,一般情况下是5037

再执行netstat -ano | findstr "5037",查看那个进程占用了,比如9392进程

执行tasklist | findstr “9392”,查看进程详细信息,我的是360mobilelink.exe

然后强制关闭,taskkill /pid 9392,应该可以关闭了吧

可是这个程序异常顽强,怎么办呢,taskkill干不掉,找个强制结束进程工具吧!!

 

4.报错:

The connection to adb is down, and a severeerror has occured.

[2015-02-14 17:37:04 - download] Theconnection to adb is down, and a severe error has occured.

[2015-02-14 17:37:04 - download] You mustrestart adb and Eclipse.

解决:

方法1.cmd中adb kill-server,然后adb -startserver

方法2.方法1不管用,那么在任务管理器中杀死adb.exe,然后重启Eclipse。

方法3.方法1和2都不管用,那么查看最后一句报错中:platform-tools中是否有adb.exe(我的错误就是在相关路径下面没有platform-tools文件夹

,所以我选择新建一个文件夹,并且把tools中的文件全部复制到platform-tools中)

你可能感兴趣的:(移动开发)