ADB 出现error:could not install *smartsocket*listener:cannot bind to 127.0.0.1:5037

在AndroidStudio中run中找不到真机,在cmd中adb remount出现如下错误:

error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)

could not read ok from ADB Server

*failed to start daemon*

error:cannot connect to daemon

原因:就是adb程序的端口被占用,接下来只要打开任务管理器将占用端口的程序kill掉即可

可以借鉴网上的方法定位问题:

  • 解决方法:

    1. 首先要找到占用adb端口的程序,5037为adb默认端口,通过cmd查看该端口情况,查询代码为:

    netstat -aon|findstr "5037"

    2 . 通过以上查询可知adb端口号被6404占用了,接下来继续通过cmd查询6404代表的程序,代码如下:

    tasklist|findstr "6540"

    17. error: cannot connect to daemon(adb.exe start-server' failed启动失败,端口占用)

    3 . 以上已经真相大白,我电脑上的360手机助手程序占用了接口,接下来打开任务管理器找到对应的程序kill掉,重新打开编译器即可。

    17. error: cannot connect to daemon(adb.exe start-server' failed启动失败,端口占用)



参考网上文章:https://www.aliyun.com/jiaocheng/12706.html


猜你喜欢

转载自blog.csdn.net/chenjinlong126/article/details/79833746