20191118のadb server version (31) doesn't match this client (41) ;could not read ok from ADB Server

使用idea测试Android的时候,提示:adb server version (31) doesn't match this client 错误

20191118のadb server version (31) doesn't match this client (41) ;could not read ok from ADB Server

如果你的电脑安装了鲁大师手机助手,360手机助手,就占用了adb的端口。

因为套接字的唯一性(一个套接字只能由 协议/网络地址/端口号 唯一确定 ),一个电脑只能有一个程序关联对应的端口,对于adb对应的端口就是5037。

为了验证你的5037端口是否被占用,可以用netstat -ano|findstr “5037” 去查找5037对应的端口号的进程id 也就是pid。


如果有相应的pid,就证明此端口5037有程序占用了

20191118のadb server version (31) doesn't match this client (41) ;could not read ok from ADB Server

5037端口有相应的进程,我们试着去查找相应的进程对应的进程名称

20191118のadb server version (31) doesn't match this client (41) ;could not read ok from ADB Server

然后杀掉进程,或者退出响应软件,再次测试成功

20191118のadb server version (31) doesn't match this client (41) ;could not read ok from ADB Server