Eclipse 错误“ADB 服务器没有 ACK,无法启动守护进程”

发布于 2024-11-02 02:19:24 字数 247 浏览 5 评论 0原文

更新SDK后,Eclipse显示此错误:

ADB 服务器没有 ACK,无法启动守护进程。

当我运行 Android 应用程序时,它会显示以下内容:

请确保adb正确位于“D:\android-sdk-windows\platform-tools\adb.exe”并且可以执行。

我该如何解决这个问题?

After updating the SDK, Eclipse shows this error:

ADB server didn't ACK, failed to start daemon.

When I run an Android application, it gives me the following:

Please ensure that adb is correctly located at 'D:\android-sdk-windows\platform-tools\adb.exe' and can be executed.

How can I fix this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(23

や三分注定 2024-11-09 02:19:25

查看防病毒软件或防火墙...是否会阻止您访问...在 k7 防病毒软件中,我关闭了系统监视器,它确实对我有效...

Look at the antivirus or firewall... Does any of that block you from access... In k7 antivirus I turned off system monitor, and it does works for me...

横笛休吹塞上声 2024-11-09 02:19:25

Linux/Ubuntu 用户也可能是这种情况......我有一个正在运行的 Android 模拟器,我不得不杀死它。为此,请执行以下操作

lsof -i :5307

(如果需要,请使用 sudo)
请注意上述命令结果中的 pid。然后

kill -9 <pid_from_above>

继续

adb shell

Linux/Ubuntu users this might also be the case.... i had an android emulator running and I had to kill that. To do that do the following

lsof -i :5307

(use sudo if needed)
Note the pid in the result of above command. Then

kill -9 <pid_from_above>

then go ahead with

adb shell
血之狂魔 2024-11-09 02:19:25

我必须允许 adb.exe 在防火墙中访问我的网络。

I had to allow adb.exe to access my network in my firewall.

冷月断魂刀 2024-11-09 02:19:25

杀死 Eclipse 然后重新启动对我没有帮助。我将 Android 工具添加到 PATH 变量中,启动任务管理器并终止 adb.exe。

我重新启动Eclipse,然后它就工作了。

Killing Eclipse and then rebooting did not help me. I added the Android tool to the PATH variables, started Task Manager and killed adb.exe.

I restarted Eclipse, and then it worked.

友欢 2024-11-09 02:19:24

谢谢,@jowett,我已经解决了同样的问题,执行这些步骤

第 1 步:
CTRL+Shift+Esc 打开任务管理器,其中有 adb.exe 进程并结束(杀死)该进程

步骤 2 :
现在,关闭当前正在我的计算机上运行的 eclipse。

第 3 步:
再次,重新启动 eclipse 然后解决该问题。


对于那些使用 OS X 的用户

killall adb

对于那些使用 Windows 的用户

adb kill-server

应该可以做到这一点。

Thanks, @jowett, I have solved my same problem, doing these steps

Step 1:
CTRL+Shift+Esc to open the task manager, which has adb.exe process and end (kill) that process

Step 2:
Now, close the eclipse, which is currently running on my computer.

Step 3:
Again, restart eclipse then solved that problem.


For those using OS X

killall adb

For those using Windows

adb kill-server

should do the trick.

温馨耳语 2024-11-09 02:19:24

我遇到了同样的问题,尽管我不知道是什么原因造成的。不管怎样,我找到了一些线索并最终解决了。

当我打开SDK和AVD管理器时,发现AVD版本(2.3.3)与android lib版本(2.3)不一样。所以我用 2.3 创建了一个新的 AVD。

我通过以下步骤修复了它:
1. 打开 Windows 任务管理器并终止 adb.exe 进程。
2. 关闭eclipse并重新启动。然后就可以了。

希望有帮助。

I met same problem, though I didn't what caused this. Whatever, i find some clues and fixed finally.

When I open SDK and AVD manager, but find the AVD version(2.3.3) is not same with android lib version(2.3). So I create a new AVD with 2.3.

I fixed it by the following steps:
1. Open windows task manager and kill adb.exe process.
2. Close eclipse and restart it. Then it works.

Hope it helps.

甜`诱少女 2024-11-09 02:19:24

命令提示符(cmd.exe):

netstat -aon | findstr 5037

查找 0.0.0.0 的进程 id:

在此处输入图像描述

确保它是 adb。 exe:

tasklist | findstr 1980

在此处输入图像描述

终止此进程:

taskkill /f /t /im adb.exe

在此处输入图像描述

让 ADB 恢复正常:

在此处输入图像描述

图片来源:博客文章*Android ADB 服务器未 ACK 无法启动守护进程< /a>*

Command prompt (cmd.exe):

netstat -aon | findstr 5037

Find the process id of 0.0.0.0:

Enter image description here

Make sure it's adb.exe:

tasklist | findstr 1980

Enter image description here

Kill this process:

taskkill /f /t /im adb.exe

Enter image description here

Get ADB back to normal:

Enter image description here

Credit: blog post *Android ADB server didn't ACK failed to start daemon*

当梦初醒 2024-11-09 02:19:24

如果您在使用 Android Studio 的同时使用 Genymotion 模拟器(在 Windows 或 Linux 上),则会出现以下症状:

adb server is out of date.  killing...
ADB server didn't ACK
* failed to start daemon *

Genymotion 包含自己的 adb 副本,这会干扰 Android SDK 中捆绑的副本。

最简单的修复方法似乎是更新 Genymotion 设置,使其使用与 Android SDK 相同的 ADB:

genymotion ADB 设置

只需选中“使用自定义 Android SDK 工具”选项并输入您想要的位置。

These symptoms occur if you are using the Genymotion emulator (on Windows or Linux) at the same time as Android Studio:

adb server is out of date.  killing...
ADB server didn't ACK
* failed to start daemon *

Genymotion includes its own copy of adb, which interferes with the one bundled in the Android SDK.

The easiest way to fix seems to be to update your Genymotion Settings so it uses the same ADB as your Android SDK:

genymotion ADB settings

Just check the "Use custom Android SDK tools" option and enter your desired location.

吹梦到西洲 2024-11-09 02:19:24

如果 adb_usb.ini 中存在换行符,ADB 通常会失败。删除它,重新启动它,这通常会解决问题(至少对我来说)。

ADB will often fail if there is a newline in adb_usb.ini. Remove it, restart it, and that will often solve the problem (at least for me anyway).

非要怀念 2024-11-09 02:19:24

如果您在设备上使用同步应用程序,也可能是因为有其他应用程序使用相同的 5037 端口。关闭端口 5037 上运行的所有服务并尝试启动 ADB。

要检查是否有任何应用程序正在使用端口 5037,请使用以下命令:

netstat -a -n -o |findstr "5037"

获取应用程序的 PID。

使用 Process Explorer 查找进程并退出它。

现在使用 adb start-serveradb get-state 启动/检查 ADB 服务器状态。

我在使用Snappea/豌豆甲同步应用程序时遇到了这个问题。

If you are using a sync application for the device, it could also be because there are other apps using the same 5037 port. Shut down all services running on port 5037 and try starting ADB.

To check if any application is using port 5037, use this:

netstat -a -n -o |findstr "5037"

Get the PID of the application.

Use Process Explorer to find the Process and exit it.

Now use adb start-server or adb get-state to start/check the ADB server status.

I faced the issue when I used the Snappea / Wandoujia Sync application.

爱给你人给你 2024-11-09 02:19:24

我通过在 ~/.android/adb_usb.ini 末尾输入额外的空行引起了这个问题

(删除额外的空行修复了问题)

I caused this problem by entering an extra blank line at the end of ~/.android/adb_usb.ini

(Removing the extra blank line fixed the problem)

み青杉依旧 2024-11-09 02:19:24

我们可以很容易地解决这个问题。

  1. 打开命令提示符,然后执行 cd
  2. 运行命令 adb Kill-server
  3. 打开 Windows 任务管理器并检查是否 adb仍在运行。如果是,只需杀死 adb.exe
  4. 在命令提示符下运行命令 adb start-server

在此输入图像描述

We can solve this issue so easily.

  1. Open a command prompt, and do cd <platform-tools directory>
  2. Run command adb kill-server
  3. Open Windows Task manager and check whether adb is still running. If it is, just kill adb.exe
  4. Run command adb start-server in the command prompt

Enter image description here

几度春秋 2024-11-09 02:19:24

我已经解决了我的第一个问题:打开Eclipse,打开SDK Manager,然后选择要打开的设备。

或者您可以打开SDK目录。打开SDK Manager,然后选择要打开的设备

2:关闭Eclipse,然后打开。

I have solved my first question: Open Eclipse, open the SDK Manager, and choose the device to open.

Or you can open the SDK directory. Open the SDK Manager, and then choose the device to open

2: Close Eclipse, and then open it.

万人眼中万个我 2024-11-09 02:19:24

确保手机上的 USB 调试已打开。 ADB Kill-server 和 ADB start-server 不是问题。

C:\Documents and Settings\Administrator> adb nodaemon server

 - cannot bind 'tcp:5037'

C:\Documents and Settings\Administrator> netstat -aon | findstr "5037"

 - TCP 127.0.0.1:1130 127.0.0.1:5037 TIME_WAIT 0
 - TCP 127.0.0.1:1269 127.0.0.1:5037 TIME_WAIT 0
 - TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3088
 - TCP 127.0.0.1:5037 127.0.0.1:1128 TIME_WAIT 0
 - TCP 127.0.0.1:5037 127.0.0.1:1129 TIME_WAIT 0
 - TCP 127.0.0.1:5037 127.0.0.1:1270 TIME_WAIT 0

C:\Documents and Settings\Administrator>tasklist -fi "pid eq 3088"

 - Image name PID session name session # memory usage

=============================================== === =================

 - adb.exe 3088 Console 0 3,816 K

C:\Documents and Settings\Administrator>taskkill /f /pid 3088

 - Success: terminate the PID for the process of 3,088.

C:\Documents and Settings\Administrator>adb start-server

 - daemon not running. starting it now on port 5037 *
 - daemon started successfully *

Make sure USB debugging on your phone is turned on. ADB kill-server and ADB start-server is not the problem.

C:\Documents and Settings\Administrator> adb nodaemon server

 - cannot bind 'tcp:5037'

C:\Documents and Settings\Administrator> netstat -aon | findstr "5037"

 - TCP 127.0.0.1:1130 127.0.0.1:5037 TIME_WAIT 0
 - TCP 127.0.0.1:1269 127.0.0.1:5037 TIME_WAIT 0
 - TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3088
 - TCP 127.0.0.1:5037 127.0.0.1:1128 TIME_WAIT 0
 - TCP 127.0.0.1:5037 127.0.0.1:1129 TIME_WAIT 0
 - TCP 127.0.0.1:5037 127.0.0.1:1270 TIME_WAIT 0

C:\Documents and Settings\Administrator>tasklist -fi "pid eq 3088"

 - Image name PID session name session # memory usage

========================= ====== ================ ======== ============

 - adb.exe 3088 Console 0 3,816 K

C:\Documents and Settings\Administrator>taskkill /f /pid 3088

 - Success: terminate the PID for the process of 3,088.

C:\Documents and Settings\Administrator>adb start-server

 - daemon not running. starting it now on port 5037 *
 - daemon started successfully *
简美 2024-11-09 02:19:24

我已经对这个问题的另一个答案投了赞成票,但为了以防万一有人想知道,您不需要重新启动 Eclipse 即可再次运行 ADB。只需打开一个 shell 并运行命令:

adb start-server

如果您尚未在系统属性中设置 ADB 的路径,那么您必须首先进入 ADB 所在的目录(在 Android\android-sdk\platform-tools...我运行的是 Windows,我不知道 mac 的人是如何做事的)。

I've already up-voted another answer here to this question, but just in case anyone was wondering, you don't need to restart Eclipse to get ADB running again. Just open a shell and run the command:

adb start-server

If you haven't set the path to ADB in your system properties then you must first go to the directory in which ADB exists(in Android\android-sdk\platform-tools....I'm running Windows, I don't know how the mac people do things).

白况 2024-11-09 02:19:24

如果您尚未安装 TCPVIEW 和 PROCESS EXPLORER,请访问 sysinternals.com 并选择它们。

由于某种原因,ADB 守护进程在关闭套接字交换完成之前终止。如果您运行(从命令提示符)“NETSTAT -o”,您将看到处于 CLOSE_WAIT 状态的套接字(通常为 5037)以及所属进程号。 Process Explorer 将不会显示该进程 ID(守护进程已终止),并且名为 adb.exe 的进程(打开套接字)将消失。 (如果找到 adb.exe,请尝试终止该任务并查看是否清理干净。)

使用 TCPVIEW,找到挂起的套接字。进程名称一栏会显示找不到关联的进程。右键单击,然后选择“关闭连接”。套接字现在已关闭,并且 adb 守护进程应该能够启动。

Run over to sysinternals.com and pick up TCPVIEW and PROCESS EXPLORER, if you don't have them installed already.

For some reason, the ADB daemon is terminating before the close socket exchange is complete. If you run (from the command prompt) "NETSTAT -o", you will see the socket (generally 5037) in CLOSE_WAIT state and the owning process number. Process Explorer won't show that process ID (the daemon terminated), and the process called adb.exe (which opened the socket) will be gone. (If adb.exe if found, try killing the task and see if things get cleaned up.)

Using TCPVIEW, locate the hung socket. The process name column will show the associated process can not be found. Right click, and select "Close Connection". The socket is now closed, and the adb daemon should be able to start.

简单气质女生网名 2024-11-09 02:19:24

我有类似的问题。从任务管理器终止 ADB 进程的现有实例对我来说不起作用

就在几天前,我早些时候尝试安装 MIPS SDK 和 ADT-17,Eclipse 给了我错误,但我没有解决这个问题。

所以,现在,当我遇到这个 ADB server did not ACK, failed to start daemon... 问题时,我在 Eclipse Help 菜单中执行了“检查更新”物品。
没有可用的更新,但至少“ADB 服务器未确认”错误消失了。

我希望这在某些情况下会有所帮助。

I had a similar issue. Killing an existing instance of the ADB process from Task Manager did not work for me.

Just few days back, I had tried to install MIPS SDK and ADT-17 earlier and Eclipse gave me the error, and I did not fix that issue.

So, now, when I got this ADB server didn't ACK, failed to start daemon... issue, I executed 'Check for Updates' in the Eclipse Help menu item.
There were no updates available, but at least 'ADB server did not ACK' error disappeared.

I hope this might help in a few cases.

叹沉浮 2024-11-09 02:19:24

在终端中输入 ./adb nodaemon server

如果它返回 Invalid content in adb_usb.ini,则 .android 文件夹中的 adb_usb.ini 文件存在问题。

打开 adb_usb.ini 并删除其内容。然后重新启动服务器......它对我有用。

Type ./adb nodaemon server in a terminal.

If it returns Invalid content in adb_usb.ini, then there is a problem with your adb_usb.ini file in the .android folder.

Open adb_usb.ini and erase its contents. Then restart the server...it worked for me.

惜醉颜 2024-11-09 02:19:24

检查Android目录的路径。它不应包含空格等。

还要检查插件是否已在 Eclipse → 首选项 中正确配置。

就我而言,我多次检查了所有内容,但仍然无法正常工作。我正要重新安装所有内容,但我在这个网站上找到了答案(其他一些帖子)。

请检查您的防病毒软件。它可能会阻止 adb.exe 或模拟器程序等的端口。这解决了我的问题。

Check for the path of the Android directory. It should not contain spaces, etc.

Also check if the plugin has been properly configured in Eclipse → Preferences.

In my case I had everything checked multiple times, but it was still not working. I was about to reinstall everything, but I came upon an answer on this site (some other post).

Do check your antivirus. It may be blocking the ports of adb.exe or emulator programs, etc. That solved the problem in my case.

冰魂雪魄 2024-11-09 02:19:24

除了@Bastet的解决方案之外:

实际上我们必须杀死使用地址0.0.0.0:0的进程。这就是为什么对于大多数人来说,从任务管理器中杀死 adb.exe 是有效的(就我而言,即使在任务管理器中我也看不到它)。

按照@Bastet步骤,我发现其他一些进程正在使用该地址。我继续杀死它,它给了我ACCESS DENIED作为Error

因此使用tasklist | findstr **** 我找到了进程的名称并从任务管理器中杀死了它。

此后它开始工作。

就我而言, bas_daemonbas_helper 使用此地址,它们都对应于 MOBOROBO

In addition to @Bastet's solution:

Actually we have to kill the process using the address 0.0.0.0:0. That's why for most of the people killing adb.exe from Task Manager was working (in my case I was not able to see it even in Task Manager).

Following the @Bastet steps, I found out that some other process was using this address. I went ahead to kill it, and it gave me ACCESS DENIED as Error.

So using the tasklist | findstr **** I found out the name of the process and killed it from Task Manager.

Thereafter it started working.

In my case bas_daemon and bas_helper were using this address both of which corresponds to MOBOROBO.

骷髅 2024-11-09 02:19:24

我也有同样的问题。但是我的笔记本上没有adb的进程。我只是注销并登录我的帐户,然后就解决了...

之后 ADB 可以从 CMD 窗口启动。

I had the same problem. But there was no process of adb on my laptop. I just log out and log in to my account, and it's resolved...

ADB could start from CMD windows after that.

若有似无的小暗淡 2024-11-09 02:19:24

无需重新启动任何设备或软件的最佳且最有效的方法是:

运行以下命令:

adt-bundle-windows-x86_64\sdk\platform-tools\adb.exe

还有一件事.. ADB 是一个独立的事物。除非它希望自己发挥作用,否则你不能做任何事情。我发现了另一种方法:让设备保持连接状态 5-6 分钟,然后等待。很快设备就会连接并尝试启动。

The best and the most efficient way without restarting any device or software is:

Run the following:

adt-bundle-windows-x86_64\sdk\platform-tools\adb.exe

And one more thing.. ADB is a self-dependent thing. You cannot do anything until unless it wants itself to work. There is one more way which I found out: Leave the device connected for 5-6 minutes and wait. Soon the device gets connected and tries to launch.

嘴硬脾气大 2024-11-09 02:19:24

直到我 root 了我的 三星 Galaxy S III 手机(遵循 xda 开发者论坛指南)。

它的发生相当随机,但在运行 Eclipse 时肯定会发生。

终止 adb.exe 进程并重新启动即可解决问题。

This didn't start happening for me until I rooted my Samsung Galaxy S III phone (following the xda-developer forum guide).

It happens pretty randomly, but it's definitely occurring while running Eclipse.

Killing the adb.exe process and restarting it solves the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文