adb一直提示过期,并杀死重连 adb server is out of date. killing...

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a924068818/article/details/81450444

只要用命令提示符执行,adb命令 shell,devices,或者connect等,就会出现以下错误

adb devices
adb server is out of date. killing…
* daemon started successfully *

然后问题就是Android studio这边设备列表中设备断开了,但是命令提示符却能看到设备,

但是用这个命令查看端口占用,找到pid,

netstat -ano | findstr "5037"
TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       7863
TCP    127.0.0.1:5037         127.0.0.1:56321        TIME_WAIT       0
TCP    127.0.0.1:5037         127.0.0.1:56322        TIME_WAIT       0

去任务管理器查看后,发现是adb在使用5037端口,没错,

什么鬼????

继续在命令行输入命令

    >where adb
    C://Windows/adb
    D://Android/adb

(黑人❓❓)

明白了,因为Android studio和命令提示符执行的不是同一个adb,可是为什么会有两个呢?windows下的哪来的?
删除(注意备份,确定没问题再彻底删除)。
搞定了。

猜你喜欢

转载自blog.csdn.net/a924068818/article/details/81450444