2024年4月5日发(作者:)

Android SDK 用 adb 命令安装应用程序失败

提示:

adb server is out of date.

ADB server didn't ACK

* failed to start daemon *

error: unknown host service

原因是 adb 服务没有启用。

命令启动 adb 服务: adb start-server 仍然无法启动

提示:

D:testandroid-sdktools>adb start-server

adb server is out of date.

ADB server didn't ACK

* failed to start daemon *

原因是 adb 服务的端口被占用,默认端口一般是5037

查询端口占用情况

命令:netstat –aon|findstr “5037”

查询结果显示,有一个进程ID为14664的占用了5037端口。

查看进程情况

命令:tasklist /FI “PID eq 14664”