Android ADB Connection Refused(连接被拒绝)

Posted scruffybear

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android ADB Connection Refused(连接被拒绝)相关的知识,希望对你有一定的参考价值。

文章目录

小结

在对android进行调试时,出现Android ADB Connection Refused(连接被拒绝)的错误,进行了解决。

问题

在对Android进行调试时,出现Android ADB Connection Refused(连接被拒绝)的错误。

解决

参考Stackoverflow: ADB Android Device Unauthorized
android studio installation failed due to ‘connection refused’

如果是5037 端口被占用,找出5037端口占用的应用,关闭掉该应用进程。
打开cmd命令窗口输入:
netstat -ano | findstr “5037”

继续输入taskkill -f -pid 'pid no.'

或者是重启ADB的服务,如下:

C:\\Users\\xiong\\AppData\\Local\\Android\\Sdk\\platform-tools>adb devices
List of devices attached
R58N34YXAWB     unauthorized

C:\\Users\\xiong\\AppData\\Local\\Android\\Sdk\\platform-tools>adb kill-server

C:\\Users\\xiong\\AppData\\Local\\Android\\Sdk\\platform-tools>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

C:\\Users\\xiong\\AppData\\Local\\Android\\Sdk\\platform-tools>adb devices
List of devices attached
R58N34YXAWB     device

可能需要在Android手机上进行重新授权。

参考

Stackoverflow: ADB Android Device Unauthorized
android studio installation failed due to ‘connection refused’
Stackoverflow: Android Studio error “Installation failed due to: ‘Connection refused: connect’”

以上是关于Android ADB Connection Refused(连接被拒绝)的主要内容,如果未能解决你的问题,请参考以下文章

adb push权限问题解决方法:RE管理器

android The connection to adb is down, and a severe error has occured

[Android]The connection to adb is down, and a severe error has occured.

The connection to adb is down, and a severe error has occured. Android ADB server didn't ACK *

Android报错 The connection to adb is down, and a severe error has occured.

android中遇到The connection to adb is down, and a severe error has occured.