adb server is out of date. killing

来源:互联网 发布:php返回html页面 编辑:程序博客网 时间:2024/05/18 09:07

1:今天调试android的时候发现一个诡异的问题

[html] view plaincopy

1.  C:\Users\xxxx>adb start-server  

2.  adb server is out of date.  killing...  

3.  ADB server didn't ACK  

4.  * failed to start daemon *  


adb
不管执行 shell devices还是logcat 都会报错

[html] view plaincopy

1.  adb server is out of date.  killing...  

究其源就是adb server没启动

stackoverflow上查了一下经过分析整理如下:

[html] view plaincopy

1.  C:\Users\xxxx>adb nodaemon server  

2.  cannot bind 'tcp:5037'  

原来adb server端口绑定失败

继续查看到底是哪个端口给占用了

[html] view plaincopy

1.  C:\Users\xxxxxx>netstat -ano | findstr "5037"  

2.    TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       4236  

3.    TCP    127.0.0.1:5037         127.0.0.1:49422        ESTABLISHED     4236  

4.    TCP    127.0.0.1:49422        127.0.0.1:5037         ESTABLISHED     3840  

打开任务管理器kill4236这个进程。ok

 

至此问题解决了

 

 

taskkill /fi "PID eq440" /f            杀死指定ID进程