Android 如何解决“ADB 服务器未确认”错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23415746/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to resolve the "ADB server didn't ACK" error?
提问by AnkitSablok
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 stackoverflow 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""
我已经尝试阅读有关此错误的所有可能的 stackoverflow 帖子,并且所有帖子都提到尝试终止 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.
有人请提出解决此问题的方法,这可能是什么原因。您也可以查看下图以推断可能发生的情况。
回答by stack247
Try the following:
请尝试以下操作:
- Close Eclipse.
- Restart your phone.
- End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.
- Issue kill and start command in \platform-tools\
- C:\sdk\platform-tools>
adb kill-server
- C:\sdk\platform-tools>
adb start-server
- C:\sdk\platform-tools>
- If it says something like 'started successfully', you are good.
- 关闭日食。
- 重启手机。
- 在任务管理器 (Windows) 中结束 adb.exe 进程。在 Mac 中,在活动监视器中强制关闭。
- 在 \platform-tools\ 中发出 kill 和 start 命令
- C:\sdk\platform-tools>
adb kill-server
- C:\sdk\platform-tools>
adb start-server
- C:\sdk\platform-tools>
- 如果它说“成功启动”之类的东西,那你很好。
回答by Ben Pearson
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 设置文件夹。
rm -Rf ~/.android
回答by mario romano lopez
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 preview 1之后发生的路径问题有关,我需要更新genymotion和virtual box,显然他们试图为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
回答by Paul Verest
Similar questions are
类似的问题是
- "The connection to adb is down, and a severe error has occured."
- The connection to adb is down, and a severe error has occured.You must restart adb and Eclipse.Please ensure that adb is correctly located
- ECLIPSE-The connection to adb is down, and a severe error has occured
- “与 adb 的连接已关闭,发生了严重错误。”
- 与 adb 的连接已关闭,发生严重错误。您必须重新启动 adb 和 Eclipse。请确保正确定位 adb
- ECLIPSE-与 adb 的连接已关闭,并且发生了严重错误
First close IDE.
首先关闭IDE。
In my case I killed adb via Task Manager(adb kill-server
did not work)
then adb start-server
就我而言,我通过任务管理器杀死了 adb(adb kill-server
不起作用)
然后adb start-server
- daemon not running. starting it now on port 5037 *
- daemon started successfully *
- 守护进程没有运行。现在在端口 5037 上启动它 *
- 守护进程成功启动 *
If you see "started successfully" than it is solved, now start IDE.
如果您看到“已成功启动”而不是已解决,请立即启动 IDE。
回答by 777Q
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:platform-tools xxx$ ./adb kill-server
xxx-MacBook-Pro:platform-tools xxx$ ./adb start-server
- daemon not running. starting it now on port 5037 *
- daemon started successfully *
xxx-MacBook-Pro:platform-tools tuananh$
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 start-server
- 守护进程没有运行。现在在端口 5037 上启动它 *
- 守护进程成功启动 *
xxx-MacBook-Pro:平台工具tuananh$
Hope this help.
希望这有帮助。
回答by AndroidManifester
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!..
注意:我遇到了同样的问题,尝试了上述解决方案。这不起作用,终于找到了这个解决方案。可能对其他人有用!..
回答by Adron
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 *
回答by Oursoul
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 服务器,我遇到了一个问题,没有 ACK * 无法启动守护程序 * 问题可能会有所帮助,尽管我还没有看到其他人遇到我的问题,所以可能没有。反正...
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 但这是像我这样一个没有受过教育的笨蛋可以绕过它的唯一方法 - 希望它会帮助某人......
回答by Raouf Mounif
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服务器”,最后我关闭了此过程并重试了上述步骤,它可以正常工作。