Android:Adb拒绝与客户端的连接 [英] Android: Adb rejected connection to client
问题描述
我正在尝试从intellij在我的nexus 5上安装一个应用程序,第一次收到错误说
I was trying to install an app on my nexus 5 from intellij and for the first time i get an error saying
"DeviceMonitor: Adb rejected connection to client '5081': closed"
我尝试重新启动我的adb重新启动计算机,禁用,启用android调试同步毕业。
奇怪的是,当我尝试在虚拟设备上运行它可以工作。任何人都有一个想法?
这是完整的错误代码:
I tried restart my adb restart computer, disable, enable android debugging sync gradle. The weird thing is that when i try running it on a virtual device it works. Anyone has an idea? Here is the full error code :
DeviceMonitor:Adb拒绝与客户端'5081'的连接:关闭
DeviceMonitor :Adb拒绝与客户端'5064'的连接:关闭
DeviceMonitor:Adb拒绝连接到客户端'4962':关闭
DeviceMonitor:Adb拒绝与客户端'5081'的连接:关闭
DeviceMonitor:Adb拒绝与客户端'5064'的连接:关闭
DeviceMonitor:Adb拒绝与客户端'5064'的连接:关闭
DeviceMonitor:Adb拒绝与客户端'3483'的连接:关闭
DeviceMonitor:Adb拒绝连接到客户端'3483':关闭
DeviceMonitor: Adb rejected connection to client '5081': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '4962': closed DeviceMonitor: Adb rejected connection to client '5081': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '3483': closed DeviceMonitor: Adb rejected connection to client '3483': closed
logcat什么也没显示,我尝试在终端adb logcat中运行它,它也显示正常。
logcat shows nothing, i tried running it in terminal "adb logcat" and it showed normal either.
推荐答案
我刚刚遇到这个问题,当我查看它时,谷歌没有产生大量的结果。 Alchete的答案是为我解决了这个问题,但是对于Windows命令行而言,我不知道如何执行它。所以我只想详细说明一下是否和我一样是在同一条船上。
I just had this issue, and Googling didn't yield a ton of results when I looked it up. Alchete's answer was what solved this issue for me, but being new to the Windows command line, I didn't know how to execute it. So I just want to elaborate in case anyone is in the same boat as I was.
打开开始菜单,然后输入cmd进入命令行。
Open the Start Menu and type cmd to get to the command line.
更改目录以获取包含adb.exe文件的sdk文件夹。
Change directories to get to the sdk folder that contains the adb.exe file.
对于我来说,看起来像这样:
For me the command looked like this:
cd Documents\Programming\android-studio\sdk\platform-tools
根据您的sdk文件夹的路径进行调整。
Adjust based on the path to your sdk folder.
然后,您可以输入:
adb kill-server
后跟:
adb start-server
这篇关于Android:Adb拒绝与客户端的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!