【错误记录】adb 调试 android 设备报错 ( adb server version (19045) doesn‘t match this client (41); killing... )
该问题之前遇到过类似的 , 但是通过如下更新 Android SDK Platform-Tools 工具版本 的方案解决 ; 参考博客 【错误记录】adb 调试 android 设备报错 ( adb server version (32) doesn‘t match this client (41); killing… )
手机上的 adb server 是新的 , 电脑上的 adb client 很长时间没有更新 , 进入 SDK Manager 中更新 Android SDK Platform-Tools 工具版本即可 ;
本次错误 , 无法通过上述方案解决 ;
重启电脑即可解决本次问题 , 猜测大概率是 电脑开机 插着手机 , adb 初始化错误导致 ;
一、错误记录
使用 adb 命令 , 查看 设备 , 报如下错误 ;
C:\Users\octop>adb devices
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon

进入 Android Studio 时 , 也报该错误 :

二、错误分析
今天出现的这个错误 , 大概率不是 软件 配置错误 , 昨天晚上下班前使用正常 , 今天早上上班突然出现该问题 ;
猜测 : 重启大概率能解决该问题 ;
上一次错误是通过 在 SDK Manager 中更新 Platform-Tools 到最新版本解决的 , 其中就包含 adb 工具 , 本次 adb 已经是最新的了 ;

本次报错 与 上一次报错 信息基本相同 ,
上一次报错的信息 :
C:\Users\octop>adb devices
adb server version (32) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon
本次报错的信息 :
C:\Users\octop>adb devices
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon
两次报错 , 只有 adb server version 是不同的 , 但是 adb server 是 手机端运行的 , 不连接手机也报错 ;
测试 网上的解决方案 : 怀疑是 ADB 客户端无法连接到 ADB 守护进程 以检查服务器版本 , 这可能是由于一些原因导致的连接问题 , 比如 ADB 守护进程未启动 , 端口被阻止或者设备连接问题等 ;
- 尝试启动 ADB 守护进程正在运行 执行
adb start-server命令 , 结果还是报相同的错误 ;
C:\Users\octop>adb start-server
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
- 尝试 重启 ADB 守护进程 , 先执行
adb kill-server, 然后执行adb start-server, 还是报相同的错误 ;
C:\Users\octop>adb kill-server
C:\Users\octop>adb start-server
adb server version (19045) doesn't match this client (41); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

-
检查 ADB 端口是否被阻止 , 尝试关闭防火墙或者防病毒软件 , 然后再次尝试连接 ;
- 操作无效 ;
-
确保你的设备已连接到计算机 , 并且USB调试模式已启用 , 尝试拔掉USB线重新插入 , 然后再次尝试连接 ;
- 操作无效 , 人包报上述错误 ;
-
重启电脑 , 再次执行
adb start-server命令 , 发现执行成功 ;
C:\Users\octop>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

此时 连接手机 , 执行 adb devices 成功 ;

三、解决方案
重启电脑 ;