简体   繁体   English

"Eclipse 错误“ADB 服务器未确认,无法启动守护程序”"

[英]Eclipse error "ADB server didn't ACK, failed to start daemon"

After updating the SDK, Eclipse shows this error:更新 SDK 后,Eclipse 显示此错误:

ADB server didn't ACK, failed to start daemon. ADB 服务器没有确认,无法启动守护进程。

When I run an Android application, it gives me the following:当我运行一个 Android 应用程序时,它给了我以下信息:

Please ensure that adb is correctly located at 'D:\\android-sdk-windows\\platform-tools\\adb.exe' and can be executed.请确保 adb 正确位于 'D:\\android-sdk-windows\\platform-tools\\adb.exe' 并且可以执行。

How can I fix this problem?我该如何解决这个问题?

Thanks, @jowett , I have solved my same problem, doing these steps 谢谢, @ jowett ,我解决了同样的问题,做了这些步骤

Step 1: CTRL + Shift + Esc to open the task manager, which has adb.exe process and end (kill) that process 第1步: CTRL + Shift + Esc打开任务管理器,其中有adb.exe进程并结束(kill)该进程

Step 2: Now, close the eclipse, which is currently running on my computer. 第2步:现在,关闭当前在我的计算机上运行的eclipse。

Step 3: Again, restart eclipse then solved that problem. 第3步:再次,重启eclipse然后解决了这个问题。


For those using OS X 对于那些使用OS X的人

killall adb

For those using Windows 对于那些使用Windows的人

adb kill-server

should do the trick. 应该做的伎俩。

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). 当我打开SDK和AVD管理器时,却发现AVD版本(2.3.3)与android lib版本(2.3)不一样。 So I create a new AVD with 2.3. 所以我用2.3创建了一个新的AVD。

I fixed it by the following steps: 1. Open windows task manager and kill adb.exe process. 我通过以下步骤修复它:1。打开Windows任务管理器并终止adb.exe进程。 2. Close eclipse and restart it. 2.关闭eclipse并重新启动它。 Then it works. 然后它工作。

Hope it helps. 希望能帮助到你。

These symptoms occur if you are using the Genymotion emulator (on Windows or Linux) at the same time as Android Studio: 如果您在Android Studio的同时使用Genymotion模拟器(在Windows或Linux上),则会出现这些症状:

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. Genymotion包含自己的adb副本,它会干扰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设置,以便它使用与Android SDK相同的ADB:

genymotion亚行设置

Just check the "Use custom Android SDK tools" option and enter your desired location. 只需选中“使用自定义Android SDK工具”选项,然后输入所需的位置即可。

ADB will often fail if there is a newline in adb_usb.ini . 如果adb_usb.ini有换行符,ADB通常会失败。 Remove it, restart it, and that will often solve the problem (at least for me anyway). 删除它,重新启动它,这通常可以解决问题(至少对我来说)。

Command prompt (cmd.exe): 命令提示符(cmd.exe):

netstat -aon | findstr 5037

Find the process id of 0.0.0.0: 找到0.0.0.0的进程ID:

在此输入图像描述

Make sure it's adb.exe: 确保它是adb.exe:

tasklist | findstr 1980

在此输入图像描述

Kill this process: 杀掉这个过程:

taskkill /f /t /im adb.exe

在此输入图像描述

Get ADB back to normal: 让亚行恢复正常:

在此输入图像描述

Credit: blog post * Android ADB server didn't ACK failed to start daemon * 信用:博客帖子* Android ADB服务器没有确认无法启动守护进程 *

If you are using a sync application for the device, it could also be because there are other apps using the same 5037 port. 如果您正在为设备使用同步应用程序,也可能是因为有其他应用程序使用相同的5037端口。 Shut down all services running on port 5037 and try starting ADB. 关闭在端口5037上运行的所有服务并尝试启动ADB。

To check if any application is using port 5037, use this: 要检查是否有任何应用程序正在使用端口5037,请使用:

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

Get the PID of the application. 获取应用程序的PID。

Use Process Explorer to find the Process and exit it. 使用Process Explorer查找Process并退出它。

Now use adb start-server or adb get-state to start/check the ADB server status. 现在使用adb start-serveradb get-state来启动/检查ADB服务器状态。

I faced the issue when I used the Snappea / Wandoujia Sync application. 当我使用Snappea / Wandoujia Sync应用程序时,我遇到了这个问题。

I caused this problem by entering an extra blank line at the end of ~/.android/adb_usb.ini 我通过在〜/ .android / adb_usb.ini的末尾输入一个额外的空行来引起这个问题

(Removing the extra blank line fixed the problem) (删除额外的空行修复了问题)

We can solve this issue so easily. 我们可以很容易地解决这个问题。

  1. Open a command prompt, and do cd <platform-tools directory> 打开命令提示符,然后执行cd <platform-tools directory>
  2. Run command adb kill-server 运行命令adb kill-server
  3. Open Windows Task manager and check whether adb is still running. 打开Windows任务管理器并检查adb是否仍在运行。 If it is, just kill adb.exe 如果是,只需杀死adb.exe
  4. Run command adb start-server in the command prompt 在命令提示符下运行命令adb start-server

在此输入图像描述

Make sure USB debugging on your phone is turned on. 确保手机上的USB调试已打开。 ADB kill-server and ADB start-server is not the problem. ADB kill-server和ADB启动服务器不是问题。

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 *

I have solved my first question: Open Eclipse, open the SDK Manager, and choose the device to open. 我已经解决了我的第一个问题:打开Eclipse,打开SDK Manager,然后选择要打开的设备。

Or you can open the SDK directory. 或者您可以打开SDK目录。 Open the SDK Manager, and then choose the device to open 打开SDK Manager,然后选择要打开的设备

2: Close Eclipse, and then open it. 2:关闭Eclipse,然后打开它。

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. 我已经向这个问题提出了另一个答案,但是如果有人想知道,你不需要重新启动Eclipse来让ADB再次运行。 Just open a shell and run the command: 只需打开一个shell并运行命令:

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). 如果你还没有在系统属性中设置ADB的路径,那么你必须先进入ADB所在的目录(在Android \\ android-sdk \\ platform-tools ....我正在运行Windows,我不是'我知道mac人是如何做事的。

I had a similar issue. 我有一个类似的问题。 Killing an existing instance of the ADB process from Task Manager did not work for me. 从任务管理器中杀死现有的ADB流程实例并不适用于我。

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. 就在几天之前,我曾尝试过早安装MIPS SDK和ADT-17,Eclipse给了我错误,我没有解决这个问题。

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. 所以,现在,当我得到这个ADB服务器没有确认,无法启动守护进程...问题时,我在Eclipse 帮助菜单项中执行了“检查更新”。 There were no updates available, but at least 'ADB server did not ACK' error disappeared. 没有可用的更新,但至少“ADB服务器没有确认”错误消失了。

I hope this might help in a few cases. 我希望这可能在一些情况下有所帮助。

Run over to sysinternals.com and pick up TCPVIEW and PROCESS EXPLORER, if you don't have them installed already. 如果你还没有安装它们,请运行到sysinternals.com并选择TCPVIEW和PROCESS EXPLORER。

For some reason, the ADB daemon is terminating before the close socket exchange is complete. 出于某种原因,ADB守护程序在关闭套接字交换完成之前终止。 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. 如果您运行(从命令提示符)“NETSTAT -o”,您将看到处于CLOSE_WAIT状态的套接字(通常为5037)和拥有的进程号。 Process Explorer won't show that process ID (the daemon terminated), and the process called adb.exe (which opened the socket) will be gone. Process Explorer不会显示进程ID(守护程序终止),并且名为adb.exe(打开套接字)的进程将消失。 (If adb.exe if found, try killing the task and see if things get cleaned up.) (如果找到adb.exe,请尝试终止任务并查看是否清理了某些内容。)

Using TCPVIEW, locate the hung socket. 使用TCPVIEW,找到挂起的套接字。 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. 套接字现已关闭,adb守护程序应该能够启动。

Check for the path of the Android directory. 检查Android目录的路径。 It should not contain spaces, etc. 它不应包含空格等。

Also check if the plugin has been properly configured in Eclipse → Preferences . 还要检查Eclipse中的插件是否已正确配置→ 首选项

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. 它可能阻止了adb.exeadb.exe程序等的端口。这解决了我的问题。

In addition to @Bastet 's solution: 除了@Bastet的解决方案:

Actually we have to kill the process using the address 0.0.0.0:0 . 实际上我们必须使用地址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). 这就是为什么从任务管理器中杀死adb.exe大多数人都在工作(在我的情况下,我甚至无法在任务管理器中看到它)。

Following the @Bastet steps, I found out that some other process was using this address. @Bastet步骤之后,我发现其他一些进程正在使用这个地址。 I went ahead to kill it, and it gave me ACCESS DENIED as Error . 我继续杀了它,它给了我ACCESS DENIEDError

So using the tasklist | findstr **** 所以使用tasklist | findstr **** tasklist | findstr **** I found out the name of the process and killed it from Task Manager. tasklist | findstr ****我找到了进程的名称并将其从任务管理器中删除。

Thereafter it started working. 此后它开始工作了。

In my case bas_daemon and bas_helper were using this address both of which corresponds to MOBOROBO . 在我的例子中, bas_daemonbas_helper正在使用这个地址,这两个地址都对应于MOBOROBO

Type ./adb nodaemon server in a terminal. 在终端中键入./adb nodaemon server

If it returns Invalid content in adb_usb.ini , then there is a problem with your adb_usb.ini file in the .android folder. 如果它Invalid content in adb_usb.ini返回Invalid content in adb_usb.ini ,则说明.android文件夹中的adb_usb.ini文件存在问题。

Open adb_usb.ini and erase its contents. 打开adb_usb.ini并清除其内容。 Then restart the server...it worked for me. 然后重启服务器......它对我有用。

I had the same problem. 我有同样的问题。 But there was no process of adb on my laptop. 但我的笔记本电脑上没有adb进程。 I just log out and log in to my account, and it's resolved... 我刚刚退出并登录到我的帐户,它已经解决了......

ADB could start from CMD windows after that. 之后,ADB可以从CMD窗口开始。

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. 我发现还有一种方法:将设备连接5-6分钟并等待。 Soon the device gets connected and tries to launch. 设备很快就会连接并尝试启动。

This didn't start happening for me until I rooted my Samsung Galaxy S III phone (following the xda-developer forum guide). 在我使用三星Galaxy S III手机(遵循xda-developer论坛指南)之前,这并没有开始发生。

It happens pretty randomly, but it's definitely occurring while running Eclipse. 它随机发生,但在运行Eclipse时肯定会发生。

Killing the adb.exe process and restarting it solves the problem. 杀死adb.exe进程并重新启动它可以解决问题。

看看防病毒或防火墙......是否有任何阻止你访问...在k7杀毒软件我关闭了系统监视器,它确实适合我...

Linux/Ubuntu users this might also be the case.... i had an android emulator running and I had to kill that. Linux/Ubuntu 用户也可能是这种情况......我有一个 android 模拟器正在运行,我不得不杀死它。 To do that do the following为此,请执行以下操作

lsof -i :5307

(use sudo if needed) Note the pid in the result of above command. (如果需要,请使用 sudo)注意上述命令结果中的 pid。 Then然后

kill -9 <pid_from_above>

then go ahead with然后继续

adb shell

Killing Eclipse and then rebooting did not help me. 杀死Eclipse然后重新启动并没有帮助我。 I added the Android tool to the PATH variables, started Task Manager and killed adb.exe. 我将Android工具添加到PATH变量,启动任务管理器并杀死adb.exe。

I restarted Eclipse, and then it worked. 我重新启动了Eclipse,然后它运行了。

我不得不允许adb.exe访问我的防火墙中的网络。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mac上Android studio3.3.2错误“ADB服务器没有ACK,无法启动守护进程” - Android studio3.3.2 error “ADB server didn't ACK, failed to start daemon” on Mac adb服务器已过期。 正在杀死…ADB服务器未确认*无法启动守护程序* - adb server is out of date. killing… ADB server didn't ACK * failed to start daemon * Appcelerator Studio / Titanium:错误:无法启动ADB(代码255):ADB服务器未确认 - Appcelerator Studio / Titanium: Error: Failed to start ADB (code 255): ADB server didn't ACK adb服务器已过期。 kill ...无法绑定&#39;tcp:5037&#39;ADB服务器没有确认*在ubuntu 14.04 LTS中无法启动守护进程* - adb server is out of date. killing… cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon * in ubuntu 14.04 LTS Android ADB在eclipse中没有问题 - Android ADB didn't ack issue in eclipse ADB服务器在macOS上没有确认 - ADB server didn't ACK on macOS Genymotion在Windows上不起作用“ ADB服务器未确认” - Genymotion doesn't work “ADB server didn't ACK” on Windows adb服务器在处理MAC时没有确认 - adb server didn't ACK while working on MAC React-Native、Android、Genymotion:ADB 服务器没有 ACK - React-Native, Android, Genymotion: ADB server didn't ACK ADB服务器未确认(Asus Transformer Pad TF700T) - ADB server didn't ACK (Asus Transformer Pad TF700T)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM