1.问题描述:
命令窗口输入adb devices时出现以下报错
adb devicesadb server is out of date. killing...
ADB server didn't ACK* failed to start daemon *error: unknown host service
2.问题原因:
adb端口(5037)被占用
3.解决方法:
- adb nodaemon server:查看端口是否被占用
- netstat -ano | findstr "5037" :查找占用端口的进程(出现类似下面的内容要执行该命令查看哪个进程占用了端口tasklist | findstr "131088")
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 131088
TCP 127.0.0.1:5037 127.0.0.1:59163 TIME_WAIT 0
- tasklist | findstr "131088"
PPADBserver 131088 Console 1 3,071 K (发现是PPADBserver占用了端口,就需要杀掉该进程)
- taskkill /f /pid 131088 (此步骤也可以在任务管理器进程标签页下直接找到该进程结束即可)
- adb devices (此时即可执行成功)