android studio 运行时无法识别真机

来源:互联网 发布:淘宝刷好评免费赠衣服 编辑:程序博客网 时间:2024/05/22 09:42

(1)错误1

2017/8/25
16:20 error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)
16:20 This application has requested the Runtime to terminate it in an unusual way.
16:20 Please contact the application's support team for more information.
16:20 could not read ok from ADB Server
16:20 * failed to start daemon *
16:20 error: cannot connect to daemon
16:20 'E:\android\androidSDK\platform-tools\adb.exe start-server' failed -- run manually if necessary

意思就说5037端口被占了。

解决方法:

1、查找谁占了端口

运行->cmd->进入安装的sdk目录下netstat -aon|findstr "5037"

如:

2、发现12260占用了 5037端口,继续查看12260的task,发现是.如下所示


3、我没有去进程里杀,我直接在界面里关闭该运用。再去进程里去了一下,没有。

4、可以识别出来了。

(2)错误2:

Installation failed with message INSTALL_FAILED_USER_RESTRICTED: Install canceled by user.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?


也就是无法安装,这时候就需要将手机调成USB安装允许即可。