在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"3 . 以上已经真相大白,我电脑上的360手机助手程序占用了接口,接下来打开任务管理器找到对应的程序kill掉,重新打开编译器即可。
参考网上文章:https://www.aliyun.com/jiaocheng/12706.html