解决mac下adb devices报错failed to check server version

背景

首先AS在显示连接设备窗口中显示device support,but ask only supports armeabi-v7a,之前可以正常debug;

其次,使用adb devices时报错如下:

➜  ~ adb devices -l
adb: failed to check server version: protocol fault (couldn't read status): Connection reset by peer

最后,adb kill-server也不行,报错如下:

➜  ~ adb kill-server
error: failed to read response from server

解决方法

通过kill pid关闭adb,而后启动adb即可

➜  ~ lsof -i :5037
COMMAND   PID      USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
studio   9849 songzeceng   24u  IPv6 0x46f7efc2d4ee4fd9      0t0  TCP localhost:61350->localhost:5037 (ESTABLISHED)
adb     17567 songzeceng   11u  IPv4 0x46f7efc2bd16d819      0t0  TCP localhost:5037 (LISTEN)
adb     17567 songzeceng   18u  IPv4 0x46f7efc2c071a9a1      0t0  TCP localhost:5037->localhost:61350 (ESTABLISHED)
➜  ~ kill 17567
➜  ~ lsof -i :5037
➜  ~ adb start-server
➜  ~ adb devices
List of devices attached
DYS9X20625K00057    device


版权声明:本文为qq_37475168原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。