启动adb 报错:端口被占用

启动adb 报错:

C:\Users\Administrator>adb devices
List of devices attached
* daemon not running. starting it now at tcp:5037 *
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:
通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
解决办法:
C:\Users\Administrator>netstat -ano | findstr "5037"      //查询5037端口占用的进程
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       3820
C:\Users\Administrator>tasklist | findstr 3820             //从进程号查找出进程的具体信息,在控制台将其kill掉
tadb.exe                      3820 Console                    1      7,208 K

C:\Users\Administrator>adb devices
List of devices attached
adb server version (31) doesn't match this client (39); killing...
error: protocol fault (couldn't read status): Connection reset by peer
* daemon started successfully *
A10ABMKSJTUK    device

端口被占用,查进程,杀进程:

  1. 根据端口号查进程号:netstat -ano | findstr 端口号
  2. 根据进程号查程序名字:tasklist | findstr 进程号
  3. 强制、递归 删除本程序及其子进程:taskkill -f -t -im 文件名

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值