如何解决“ADB服务器没有确认”错误? [重复]

时间:2022-09-19 20:22:56

This question already has an answer here:

这个问题在这里已有答案:

I am trying to install my project on 5 AVD's at the same time, but I constantly get this error, I am executing it on Windows 8.1

我试图同时在5个AVD上安装我的项目,但是我经常遇到这个错误,我在Windows 8.1上执行它

"* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon"

I have tried reading all possible posts on * concerning this error, and all of them just mention that try to kill the adb process and restart eclipse and then all will be fine. I have tried the method mentioned in the posts and along with that I have also turned off my security and firewall, so that there is no obstruction on the port 5037. Somebody please help me as I need to execute my project and I am not able to do so :(. For your reference I can provide the output of the following command "netstat -ano | findstr "5037""

我已经尝试阅读有关此错误的*上所有可能的帖子,并且所有这些只是提到尝试杀死adb进程并重新启动eclipse然后一切都会好的。我已经尝试了帖子中提到的方法,同时我也关闭了我的安全和防火墙,这样端口5037就没有障碍了。有人请帮助我,因为我需要执行我的项目而且我不能这样做:(。供我参考,我可以提供以下命令的输出“netstat -ano | findstr”5037“”

 TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       7144
 TCP    127.0.0.1:5037         127.0.0.1:57410        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57411        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57414        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57415        ESTABLISHED     7144
 ...

Somebody please suggest a workaround this problem, what might be the cause of this. Also you can take a look at the following image to infer what might be happening.

有人请建议解决这个问题,可能是造成这种情况的原因。您还可以查看下面的图像来推断可能发生的情况。

9 个解决方案

#1


66  

Try the following:

请尝试以下方法:

  • Close Eclipse.
  • 关闭Eclipse。
  • Restart your phone.
  • 重启手机
  • End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.
  • 在任务管理器(Windows)中结束adb.exe进程。在Mac中,强制关闭活动监视器。
  • Issue kill and start command in \platform-tools\
    • C:\sdk\platform-tools>adb kill-server
    • C:\ sdk \ platform-tools> adb kill-server
    • C:\sdk\platform-tools>adb start-server
    • C:\ sdk \ platform-tools> adb start-server
  • 在\ platform-tools \ C:\ sdk \ platform-tools> adb kill-server C:\ sdk \ platform-tools> adb start-server中发出kill和start命令
  • If it says something like 'started successfully', you are good.
  • 如果它说“成功开始”,那你很好。

#2


26  

For anyone using OSX (I'm aware OP isn't): What worked for me in the end was removing the android settings folder in the home directory.

对于任何使用OSX的人(我知道OP不是):最终对我有用的是删除主目录中的android settings文件夹。

rm -Rf ~/.android

#3


15  

For me it didn't work , it was related to a path problem happened after android studio 2.0 preview 1, I needed to update genymotion and virtual box, and apparently they tried to use same port for adb.

对我来说它没有用,它与android studio 2.0预览1后发生的路径问题有关,我需要更新genymotion和虚拟框,显然他们试图使用相同的端口进行adb。

Solution is explained here link! Basically you just need to:

解决方案在这里解释链接!基本上你只需要:

1) open genymotion settings

1)打开genymotion设置

2) specify sdk path for the adb manually

2)手动指定adb的sdk路径

3) adb kill-server

3)adb kill-server

4) adb start-server

4)adb start-server

#4


8  

Similar questions are

类似的问题是

First close IDE.

首先关闭IDE。

In my case I killed adb via Task Manager(adb kill-server did not work)
then adb start-server

在我的情况下,我通过任务管理器(adb kill-server没有工作)杀了adb然后adb start-server

  • daemon not running. starting it now on port 5037 *
  • 守护程序没有运行。现在从5037号港口开始
  • daemon started successfully *
  • 守护进程成功启动*

If you see "started successfully" than it is solved, now start IDE.

如果您看到“已成功启动”而不是已解决,请立即启动IDE。

#5


4  

On my Mac, I wrote this code in my Terminal:

在我的Mac上,我在终端中编写了这段代码:

xxx-MacBook-Pro:~ xxx$ cd /Users/xxx/Documents/0_Software/adt20140702/sdk/platform-tools/

xxx-MacBook-Pro:~xxx $ cd / Users / xxx / Documents / 0_Software / adt20140702 / sdk / platform-tools /

xxx-MacBook-Pro:platform-tools xxx$ ./adb kill-server

xxx-MacBook-Pro:platform-tools xxx $ ./adb kill-server

xxx-MacBook-Pro:platform-tools xxx$ ./adb start-server

xxx-MacBook-Pro:platform-tools xxx $ ./adb start-server

  • daemon not running. starting it now on port 5037 *
  • 守护程序没有运行。现在从5037号港口开始
  • daemon started successfully *
  • 守护进程成功启动*

xxx-MacBook-Pro:platform-tools tuananh$

xxx-MacBook-Pro:平台工具tuananh $

Hope this help.

希望这有帮助。

#6


2  

if you are using any mobile suit like mobogenie or something that might also will make this issue. try killing that too from the task manager.

如果你正在使用像mobogenie这样的移动套装,或者也可能会出现这个问题。尝试从任务管理器中删除它。

Note : i faced the same issue, tried the above solution. That didn't work, finally found out this solution.May useful for someone else!..

注意:我遇到了同样的问题,试过上面的解决方案。那没用,终于找到了这个解决方案。对别人有用!

#7


1  

On my end, I used Resource Monitor to see which application was still listening to port 5037 after all the Eclipse and adb restart were unsuccessful for me.

在我结束时,我使用资源监视器来查看在所有Eclipse和adb重新启动对我不成功之后哪个应用程序仍在侦听端口5037。

Start > All Programs > Accessories > System Tools >
Resource Monitor > Network > Listening Ports

This eventually showed that java.exe was listening to port 5037, hence, preventing adb from doing so. I killed java.exe, immediately start adb (with adb start-server) and received a confirmation that adb was able to start:

这最终表明java.exe正在侦听端口5037,因此阻止了adb这样做。我杀了java.exe,立即启动adb(使用adb start-server)并收到adb能够启动的确认:

android-sdks\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

#8


0  

I've got a kind of botch for the old ADB server didn't ACK * failed to start daemon * issue which might help, though i haven't seen anyone else with my problem so maybe not. Anyway...

我有一种旧的ADB服务器没有确认*未能启动守护进程*问题,这可能会有所帮助,虽然我还没有看到其他人与我的问题,所以也许没有。无论如何...

I changed the default install location for my HTC sensation to 2 (SD card), but when trying to revert back to 0 (internal) i was getting this error. Looking in task manager showed there were 2 instances of adb.exe running, one of which kept stopping and starting and was impossible to kill, the other could be killed but then a new instance would start almost immediately.

我将HTC感觉的默认安装位置更改为2(SD卡),但是当尝试恢复为0(内部)时,我收到此错误。查看任务管理器显示有2个adb.exe运行实例,其中一个停止并启动并且无法杀死,另一个可能被杀死但是新实例几乎立即启动。

The only way i could get adb to start successfully was to get my command ready in the command window, go to task manager to end the adb.exe, then when the window came up saying 'are you sure you want to kill adb.exe' dragged that over the command window, clicked OK then immediately pressed Enter to run the command. It seems that the short window between adb.exe being killed and restarting itself is sufficient to run a command, though if you try to do something else it won't work and you have to repeat this process each time you want to run a command.

我能成功启动adb的唯一方法是在命令窗口中准备好我的命令,转到任务管理器结束adb.exe,然后当窗口出现时说'你确定要杀死adb.exe '在命令窗口上拖动它,单击确定,然后立即按Enter键运行命令。似乎adb.exe被杀死和重新启动之间的短窗口足以运行命令,但是如果你尝试做其他事情它将无法工作,你必须在每次要运行命令时重复此过程。

PITA but it's the only way an uneducated numpty like myself could get round it - hopefully it'll help someone...

PITA,但这是像我这样没有受过教育的numpty可以绕过它的唯一方式 - 希望它能帮助某人......

#9


-3  

i have solve this problem several times using the same steps :

我使用相同的步骤多次解决这个问题:

1- Close Eclipse.

1-关闭Eclipse。

2- Restart your phone.

2-重新启动手机。

3- End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.

3-在任务管理器(Windows)中结束adb.exe进程。在Mac中,强制关闭活动监视器。

4- Issue kill and start command in \platform-tools\

4-在\ platform-tools中发出kill和start命令

C:\sdk\platform-tools>adb kill-server

C:\ sdk \ platform-tools> adb kill-server

C:\sdk\platform-tools>adb start-server

C:\ sdk \ platform-tools> adb start-server

5- If it says something like 'started successfully', you are good.

5-如果它说的是“成功开始”,那你很好。

but now it's doesn't work cause i have an anti-virus called "Baidu", this program have run "Baidu ADB server", finally i turn this process off and retry above steps it's work properly.

但现在它不起作用因为我有一个名为“百度”的反病毒,这个程序运行“百度ADB服务器”,最后我关闭这个过程并重试上面的步骤它正常工作。

#1


66  

Try the following:

请尝试以下方法:

  • Close Eclipse.
  • 关闭Eclipse。
  • Restart your phone.
  • 重启手机
  • End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.
  • 在任务管理器(Windows)中结束adb.exe进程。在Mac中,强制关闭活动监视器。
  • Issue kill and start command in \platform-tools\
    • C:\sdk\platform-tools>adb kill-server
    • C:\ sdk \ platform-tools> adb kill-server
    • C:\sdk\platform-tools>adb start-server
    • C:\ sdk \ platform-tools> adb start-server
  • 在\ platform-tools \ C:\ sdk \ platform-tools> adb kill-server C:\ sdk \ platform-tools> adb start-server中发出kill和start命令
  • If it says something like 'started successfully', you are good.
  • 如果它说“成功开始”,那你很好。

#2


26  

For anyone using OSX (I'm aware OP isn't): What worked for me in the end was removing the android settings folder in the home directory.

对于任何使用OSX的人(我知道OP不是):最终对我有用的是删除主目录中的android settings文件夹。

rm -Rf ~/.android

#3


15  

For me it didn't work , it was related to a path problem happened after android studio 2.0 preview 1, I needed to update genymotion and virtual box, and apparently they tried to use same port for adb.

对我来说它没有用,它与android studio 2.0预览1后发生的路径问题有关,我需要更新genymotion和虚拟框,显然他们试图使用相同的端口进行adb。

Solution is explained here link! Basically you just need to:

解决方案在这里解释链接!基本上你只需要:

1) open genymotion settings

1)打开genymotion设置

2) specify sdk path for the adb manually

2)手动指定adb的sdk路径

3) adb kill-server

3)adb kill-server

4) adb start-server

4)adb start-server

#4


8  

Similar questions are

类似的问题是

First close IDE.

首先关闭IDE。

In my case I killed adb via Task Manager(adb kill-server did not work)
then adb start-server

在我的情况下,我通过任务管理器(adb kill-server没有工作)杀了adb然后adb start-server

  • daemon not running. starting it now on port 5037 *
  • 守护程序没有运行。现在从5037号港口开始
  • daemon started successfully *
  • 守护进程成功启动*

If you see "started successfully" than it is solved, now start IDE.

如果您看到“已成功启动”而不是已解决,请立即启动IDE。

#5


4  

On my Mac, I wrote this code in my Terminal:

在我的Mac上,我在终端中编写了这段代码:

xxx-MacBook-Pro:~ xxx$ cd /Users/xxx/Documents/0_Software/adt20140702/sdk/platform-tools/

xxx-MacBook-Pro:~xxx $ cd / Users / xxx / Documents / 0_Software / adt20140702 / sdk / platform-tools /

xxx-MacBook-Pro:platform-tools xxx$ ./adb kill-server

xxx-MacBook-Pro:platform-tools xxx $ ./adb kill-server

xxx-MacBook-Pro:platform-tools xxx$ ./adb start-server

xxx-MacBook-Pro:platform-tools xxx $ ./adb start-server

  • daemon not running. starting it now on port 5037 *
  • 守护程序没有运行。现在从5037号港口开始
  • daemon started successfully *
  • 守护进程成功启动*

xxx-MacBook-Pro:platform-tools tuananh$

xxx-MacBook-Pro:平台工具tuananh $

Hope this help.

希望这有帮助。

#6


2  

if you are using any mobile suit like mobogenie or something that might also will make this issue. try killing that too from the task manager.

如果你正在使用像mobogenie这样的移动套装,或者也可能会出现这个问题。尝试从任务管理器中删除它。

Note : i faced the same issue, tried the above solution. That didn't work, finally found out this solution.May useful for someone else!..

注意:我遇到了同样的问题,试过上面的解决方案。那没用,终于找到了这个解决方案。对别人有用!

#7


1  

On my end, I used Resource Monitor to see which application was still listening to port 5037 after all the Eclipse and adb restart were unsuccessful for me.

在我结束时,我使用资源监视器来查看在所有Eclipse和adb重新启动对我不成功之后哪个应用程序仍在侦听端口5037。

Start > All Programs > Accessories > System Tools >
Resource Monitor > Network > Listening Ports

This eventually showed that java.exe was listening to port 5037, hence, preventing adb from doing so. I killed java.exe, immediately start adb (with adb start-server) and received a confirmation that adb was able to start:

这最终表明java.exe正在侦听端口5037,因此阻止了adb这样做。我杀了java.exe,立即启动adb(使用adb start-server)并收到adb能够启动的确认:

android-sdks\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

#8


0  

I've got a kind of botch for the old ADB server didn't ACK * failed to start daemon * issue which might help, though i haven't seen anyone else with my problem so maybe not. Anyway...

我有一种旧的ADB服务器没有确认*未能启动守护进程*问题,这可能会有所帮助,虽然我还没有看到其他人与我的问题,所以也许没有。无论如何...

I changed the default install location for my HTC sensation to 2 (SD card), but when trying to revert back to 0 (internal) i was getting this error. Looking in task manager showed there were 2 instances of adb.exe running, one of which kept stopping and starting and was impossible to kill, the other could be killed but then a new instance would start almost immediately.

我将HTC感觉的默认安装位置更改为2(SD卡),但是当尝试恢复为0(内部)时,我收到此错误。查看任务管理器显示有2个adb.exe运行实例,其中一个停止并启动并且无法杀死,另一个可能被杀死但是新实例几乎立即启动。

The only way i could get adb to start successfully was to get my command ready in the command window, go to task manager to end the adb.exe, then when the window came up saying 'are you sure you want to kill adb.exe' dragged that over the command window, clicked OK then immediately pressed Enter to run the command. It seems that the short window between adb.exe being killed and restarting itself is sufficient to run a command, though if you try to do something else it won't work and you have to repeat this process each time you want to run a command.

我能成功启动adb的唯一方法是在命令窗口中准备好我的命令,转到任务管理器结束adb.exe,然后当窗口出现时说'你确定要杀死adb.exe '在命令窗口上拖动它,单击确定,然后立即按Enter键运行命令。似乎adb.exe被杀死和重新启动之间的短窗口足以运行命令,但是如果你尝试做其他事情它将无法工作,你必须在每次要运行命令时重复此过程。

PITA but it's the only way an uneducated numpty like myself could get round it - hopefully it'll help someone...

PITA,但这是像我这样没有受过教育的numpty可以绕过它的唯一方式 - 希望它能帮助某人......

#9


-3  

i have solve this problem several times using the same steps :

我使用相同的步骤多次解决这个问题:

1- Close Eclipse.

1-关闭Eclipse。

2- Restart your phone.

2-重新启动手机。

3- End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.

3-在任务管理器(Windows)中结束adb.exe进程。在Mac中,强制关闭活动监视器。

4- Issue kill and start command in \platform-tools\

4-在\ platform-tools中发出kill和start命令

C:\sdk\platform-tools>adb kill-server

C:\ sdk \ platform-tools> adb kill-server

C:\sdk\platform-tools>adb start-server

C:\ sdk \ platform-tools> adb start-server

5- If it says something like 'started successfully', you are good.

5-如果它说的是“成功开始”,那你很好。

but now it's doesn't work cause i have an anti-virus called "Baidu", this program have run "Baidu ADB server", finally i turn this process off and retry above steps it's work properly.

但现在它不起作用因为我有一个名为“百度”的反病毒,这个程序运行“百度ADB服务器”,最后我关闭这个过程并重试上面的步骤它正常工作。