Related
command not execute
Now I am going to command prompt and go to the bin folder under the installation path of Nox App Player, and I input this command: nox_adb.exe connect 127.0.0.1:62001.
You need to find the correct port and use it. I faced the same problem so here is what I did.
Kill the server:
nox_adb.exe kill-server
Now try to connect on any port number, say, 62001:
C:\Program Files (x86)\Nox\bin>nox_adb.exe connect 127.0.0.1:62001
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
unable to connect to 127.0.0.1:62001:62001
Now try to use port 5037 as mentioned in the output above:
C:\Program Files (x86)\Nox\bin>nox_adb.exe kill-server
C:\Program Files (x86)\Nox\bin>nox_adb.exe connect 127.0.0.1:5037
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 127.0.0.1:5037
It should work fine then.
find the file location of nox and copy-it
write in cmd:
cd and write the location here
and
adb.exe connect 127.0.0.1:5037
people write "nox.adb.exe" but it's
false
Try this :
cd C:\Program Files (x86)\Nox\bin
and
C:\Program Files (x86)\Nox\bin>nox_adb.exe connect 127.0.0.1:5037
I am solving this problem everyday by running vscode first and then running nox. then killing adb.exe process tree by Task manager and then running nox_adb.exe connect 127.0.0.1:62001 (or 127.0.0.1:52001). Doing all these steps several time everyday.
This worked for me:
(xxxxx = port number, i used 62001)
also
Important to include "" (quotation marks)...
"C:\Program Files\nox\Nox\bin\nox_adb.exe" connect 127.0.0.1:xxxxx
Praise be to God, it's finally fixed. I tried all the above solution and none worked, I even tried updating to the latest version before. I guess updating doesn't update all the files.
The issue was the either adb.exe or nox-adb.exe had an issue, it's not the port that's the issue, it's the adb itself, poiting to a null location, it's weird how it got corrupted. replacing the DLLs as mentioned by a different answer didn't work for me, that's how I know it's the adb executables.
Anyways, the solution is to extract the adb.7z file that's in the bin folder and replace the old files, that's it :)
Short answer:
Extract "C:\Program Files\Nox\bin\adb.7z" & replace all
find adb.exe file path, open console and write: C:\Users\petra\AppData\Local\Android\Sdk\platform-tools (it has to be your path to adb file)\adb.exe connect 127.0.0.1:62001 make sure nox is turned on and try this till you see:
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 127.0.0.1:62001
Maybe I'm late for this answer but it could be help someone. I faced same problem and trying to connect nox player with studio, with many attempts I finally found perfect cure for this issue. You have to make sure adb version for both android sdk and nox player uses same.
If they are different, then make them same by replacing these files
(adb.exe, nox_adb.exe, AdbWinApi.dll, AdbWinApi_.dll)
of nox player bin folder (C:\Program Files\Nox\bin\Nox\bin) from android sdk (C:\Users\harvi\AppData\Local\Android\Sdk\platform-tools). And that's it nox player now easily connect with android studio.
Note: create nox_adb file from adb.exe from sdk folder.
input this command : nox_adb.exe connect 127.0.0.1:62025
Press Ctrl+Shift+Esc.
Task Manager should open.
Click "More details" from below.
A larger list of apps should appear.
Locate adb.exe select it then click 'End Task'.
Restart Nox or do what #kundan's answer suggests.
I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation:
...
04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use
04:54:40 E/adb: ADB server didn't ACK
04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary
04:54:40 E/adb: * failed to start daemon *
04:54:40 E/adb: error: cannot connect to daemon
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Timeout getting device list.
...
However, adb devices returns this:
List of devices attached
192.168.59.101:5555 device
So far I've found no solution to run my app on the emulator. Has anyone encountered the same issue?
Thanks,
Paul
After more research I've realized that Genymotion uses by default its own adb.
I switched to my main adb (the same used by react-native) and it solved the issue. I guess that because Genymotion's adb was launched first I got the Address already in use error message.
I am using genymotion, but Paul's solution alone did not fix the error (for Mac).
I had to:
Update Android SDK to the latest version (24.4.1) via the SDK manager
Type android in the command line
In the SDK manager find the latest SDK tools and install.
Once installed the SDK path should update the new SDK location like below.
Then update the $ANDROID_HOME to use the new SDK
export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Confirm it has been added by viewing your path with echo $PATH
Then in genymotion do what #Paul says above and point genymotion ADB to use the same sdk
System: Windows 10
My issue: Setting Genymotion to point to the custom SDK didn't have any affect. I still received the:
Couldn't start project on Android: could not install smartsocket
listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket
address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server * failed to start daemon * error:
cannot connect to daemon
What I discovered was there was a difference in ADB versions being used throughout the system. Here is the command I used to find them:
where /r C:\ adb.exe
This produced the results:
C:\Program Files\Expo XDE\resources\app\node_modules\xdl\binaries\windows\adb\adb.exe
C:\Program Files\Genymobile\Genymotion\tools\adb.exe
C:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb backup\adb.exe
Navigating to each directory and running:
adb.exe version
Allowed me to see that Expo was running ADB version:
Android Debug Bridge version 1.0.36
Revision fd9e4d07b0f5-android
While Genymotion using the custom SDK had version (c:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe):
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
As a test I took the adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) from
c:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe
and placed them into a backup folder. I then moved the adb files located at
c:\Program Files\Expo XDE\resources\app\node_modules\xdl\binaries\windows\adb\adb.exe
into that same location. I killed adb with:
adb kill-server
which caused a restart of the adb server automatically due to having my Genymotion device already running. I hit the "Restart" button inside of the Expo XDE and it immediately began working. Here is the log where I hit the restart button at 1:13:04 AM:
12:45:53 AM
could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
1:13:04 AM
Restarting project and clearing packager cache (Hold shift while clicking restart to avoid clearing cache).
1:13:11 AM
Starting React Native packager...
1:13:17 AM
Scanning 543 folders for symlinks in C:\Users\kyle\git\betalog\node_modules (49ms)
1:13:17 AM
1:13:19 AM
Couldn't adb reverse: closed
1:13:20 AM
Project opened! You can now use the "Share" or "Device" buttons to view your project.
1:13:26 AM
Couldn't adb reverse: closed
1:13:26 AM
Downloading latest version of Expo
1:13:28 AM
Installing Expo on device
1:13:33 AM
Opening on Android device
1:13:56 AM
Building JavaScript bundle: finished in 59643ms.
1:14:01 AM
Dependency graph loaded.
1:14:03 AM
Your JavaScript transform cache is empty, rebuilding (this may take a minute).
Conclusion: Genymotion and Expo may need to use the same version of adb so that Expo can properly communicate with the simulated device. Pointing Genymotion to your android SDK location as well as ensuring Expo XDE has that same version will allow correct communication between devices. I moved the Expo XDE version to the SDK location, but you might be able to go the other way (take the sdk ADB files and place them in the Expo XDE resource location).
P.S. I've been all through the stackoverflow posts related to this issue. Just so you guys know my task manager shows three instances of adb.exe running. If you kill any of them they just come back.
Hope this helps /cheers
Maybe your adb versions are mismatching
Check:
adb version
Then:
cd /Path/to/Android/Sdk/platform-tools && ./adb version
If these two are different you have an error here, just remove adb from sys and copy the one that is in platform-tools to /usr/bin/
the adb version on your system is different from the adb version on the android sdk platform-tools .
Below suggestion is work for me for Linux operating system
check sys adb version run the below command
adb version
Android Debug Bridge version 1.0.39
check sdk adb version
cd /root/Android/Sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
copy
rm /usr/bin/adb
[Note : the above command remove the existing adb then copy the adb from sdk/platform-tools directory ]
sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb
Then run the project using this command
react-native run-android
If want to keep your system clean, you can also use Genymotion without Android Studio:
Find Genymotion's copy of adb. On macOS this is normally /Applications/Genymotion.app/Contents/MacOS/tools/.
Add the Genymotion tools directory to your path - execute/add the line export PATH=/Applications/Genymotion.app/Contents/MacOS/tools/:$PATH to your ~/.bash_profile or ~/.bash_rc.
Make sure that you can run adb from your terminal.
(From https://docs.expo.io/versions/latest/workflow/genymotion)
I had the same thing while I tried to run from expo UI.
Did the same things, as described in answers, but app was not running.
When once tried run exp android from command line (in the project folder), application ran successfully and next times runs from Expo UI was successfully.
I had a similar issue.
First, I uninstalled the app.
Then, I pointed GenyMotion to the android sdk provided from Android Studio
Next, I ran "adb kill-server" into the terminal.
Finally, I re-ran "react-native run-android" and got a build success.
The steps worked for me are :
$ adb kill-server
$ adb start-server
$ cd android
$ ./gradlew clean
$ cd ..
$ react-native run-android
For Ubuntu
It works for me!!
check sys adb version
adb version
Android Debug Bridge version 1.0.39
2 check sdk adb version
cd /home/user_name/Android/sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
copy
sudo cp /home/user_name/Android/sdk/platform-tools/adb /usr/local/bin
that's all! It will work now.
1.use custom sdk path in genymotion.(Suppose this one won't work means,Try to execute the second one)
2.Manually use this command to execute(SDK PATH/adb she
ll am start -n/Package name/MainActivity).
C:\Users\AppData\Local\Android\Sdk/platform-tools/adb she
ll am start -n com.example/com.example.ManiActivity
And try to run the application by using react-native run-android.
Same issue happened when I try to run my react-native project in Genymotion
For Linux ubuntu 20.04
Go to /home/mycomputer/Android/Sdk/platorm-tools
run $./adb version
just copy the adb path in /usr/bin
$ sudo cp /home/raik/Android/Sdk/platform-tools/adb /usr/bin
Then I can run my project in genymotion.
Note: In some Linux system may be copied to this path /usr/local/bin`
If someone is facing this issue in Windows with Android Studio emulator then just run following command in powershell or cmd:
taskkill /F /IM adb.exe
It should kill all the adb process instances and then you can Reload the app or Start the App on Android again via Expo CLI.
I am a newbie and want to learn android. However, I face difficulties during installation of android studio.
I have installed android studio correctly but when I want to run a Hello World in my android device, it shows
ADB not responding. If you'd like to retry, then please manually kill
"adb.exe" and click 'Restart'
I have searched it from the Internet but it still cannot solve the problem, what can I do to solve it?
I've found the answer to this. This had been plaguing me for days, but so happy to have this fixed.
When I go to task manager the process adb.exe was constantly restarting itself. This is what was causing the issue (for me).
Go to Tools -> Android -> Enable ADB entegration. Untick this. Make sure its status appears as unticked. Now go to task manager and killed the process adb.exe, it will not restart itself this time. Now click run, hey presto, ADB runs. Whoop de doo.
Here is what worked for me on Ubuntu:
I simply removed the file /tmp/adb.log
sudo rm /tmp/adb.log
Hope it helped.
Cheers.
You should first try stopping adb and then restarting it.
Use this command:
adb kill-server
followed by:
adb start-server
On Mac OSX: If the adb process needs to be killed, you can use ps to show all processes with the following command, (pipe through grep to find it easier)
ps aux | grep adb
You can kill it with the following command, using the process id of adb from the previous ps command.
kill -9 <process id>
you need platform-tools_r23.0.1-linux.zip . Url for it from google's repository is:
https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
Go into your android-sdk-linux directory, I deleted the platform-tools directory (but I think that's unnecessary) and unzip'ed the platform-tools zip there. The SDK updater correctly shows 23.0.1 is installed at this point.
all will work properly
one can find detailed discussion about this issue here
I had the problem because the project was not built and showed an error as follows
Error:Error: Cannot run program "/path/to/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory
I solved the problem by running those commands
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
Ubuntu can't run the aapt on 64 bit before installing this packages
Thanks to https://stackoverflow.com/a/27734148/2119981
I solve the problem.Open cmd and input netstat -aon|findstr 5037 .if there is a process uses the port.You should kill it.You can get the pid and find the process in Task Manager.
I Battled with this problem for a couple of days (nearly drove me nuts) and every solution I found failed to help me. Till I tried this:
(On Mac)
I uninstalled Android Studio (moved it from Applications to Trash).
Restarted my Mac.
Reinstalled Android Studio (moved it back from Trash to Applications).
And everything was back to normal.
I didn't find adb.exe in the task manager so i did the following and it worked fine after that
I closed the emulator and removed my phone.
restart the windows.
connect the usb device and then i run the application.
Go to Tools -> Android -> Enable ADB entegration
untick it and press run ( you will get an error) now re-tick it and press run and it will works.
Open "Android Monitor" window at the bottom of Android Studio, there will be some error info of the problem.
And my problem hint is "no permission to access /tmp/adb.1001.log".
Just remove the file, the problem will been resolved.
I have installed Android Studio.
Then I have updated the Android SDK.
Now when I start Android Studio, this message pops up:
ADB not responding. You can wait more,or kill "adb.exe" process manually and click 'Restart'
The dialog has 3 options: Wait more, Restart and Cancel.
But all of them
gives me the same result, i.e. a message Waiting for ADB appears and I can't do anything with Android Studio.
I have to kill the program using windows task manager! I'm using windows 7.
Can anyone help me on this?
Go to
Tools > Android > (Uncheck) Enable ADB Integration
(if studio hangs/gets stuck end adb process manually)
then,
Tools > Android > (Check) Enable ADB Integration
On my macbook pro, i was occasionally getting this in Android Studio. The following resolved it for me:
Open up a Terminal and, instead of using 'adb kill-server', use this:
$ killall adb
wait a minute and it looks like Android Studio automatically restarts adb on it's own.
From the command prompt run the command adb kill-server. This will shutdown ADB and android studio or Eclipse if you were to use that, would show Waiting for ADB as you said.
Once ADB has shutdown down run adb start-server or run adb devices which will automatically start the adb service and show that your android emulator or development devices has successfully connected.
If you are suffering from "ADB not responding. If you’d like to retry, then please manually kill ‘adb’ and click ‘Restart’ or terminal appear Syntax error: “)” unexpected"
then perhaps you are using 32bit OS and platform-tools has updated up 23.1.
The solution is to go back to the platform-tools 23.0.1.
You can download the platform-tools 23.0.1 for Linux here , for windowns here and Mac here
After the download, go to your sdk location > platform-tools folder to delete old platform-tools in sdk and paste down into the downloaded one.
Woohooo ... it should work.
This is a bug with latest ADT.
For me, on Windows 7, killing the ADB server and restarting it via command line did not help. It would not start up successfully.
>adb kill-server
>adb start-server
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
So killing the adb.exe process via Task Manager was actually the easiest solution that case.
Check if any service is listening on port 5037, and kill it. You can use lsof for this:
$ lsof -i :5037
$ kill <PID Process>
Then try
$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This solved my problem.
I ran into this problem and tried a number of solutions on my Mac without any success. I finally got to work with the commands below:
$ rm -rf ~/.android
$ killall adb
$ adb devices
Note that rm -rf ~/.android will remove any AVDs that you have configured, so don't take this step lightly. Personally I had to though and I'm not sure why. Hopefully this helps someone.
This issue could be because adb incompatibility with the newest version of the platform SDK.
Try the following:
If you are using Genymotion, manually set the Android SDK within Genymotion settings to your sdk path. Go to Genymotion -> settings -> ADB -> Use custom SDK Tools -> Browse and ender your local SDK path.
If you haverecently updated your platform-tools plugin version, revert back to 23.0.1.
Its a bug within ADB, one of the above must most likely be your solution.
I run netstat -nao | findstr 5037 in cmd.
As you see there is a process with id 3888. I kill it with taskkill /f /pid 3888
if you have more than one, kill all.
after that run adb with adb start-server, my adb run sucessfully.
1.if your phone system is over 4.2.2 , there will be
2.disconnect the USB and try again or restart your phone
3.After after all try , it didn't work. It may be a shortage power supply so try other usb interface on your computer.
I solved the problem doing the first step . anyway have try.
If you need to kill all adb processes on windows with one command, you can do it as follows:
taskkill /F /IM adb*
I had this problem and solved it by this way...
I had a app in my pc that used adb...
I tried to disable it but still my android studio's adb had problem
after unistall that application and problem solved.
I had the same problem. I have restarted ADB in any possible way, I have killed the process and restarted the PC with no results.
Then I found this plugin. Just download and install it in your Android Studio IDE. Under Tools -> Android you have a menu ADB Idea. Here you can kill, start, restart, clean ADB.
None of the above helped me completely. Although Oventoaster made me think. I had a couple of adb on my system. Removed them almost all.
I am running android studio on ubuntu 14.04 64 bit.
So I checked manually /home/xxxxx/Android/Sdk/platform-tools/adb
where xxxxx was my linux username
this gave
/home/xxxxx/Android/Sdk/platform-tools/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
https://stackoverflow.com/a/27415749/4453157
solved it for me.
If the above CMD command option is not working and you cannot make it work in any other way then follow this below.
Click on below link
http://adbshell.com/downloads
and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).
After downloading replace these files with the ones in the path
Android/Sdk/platform-tools/
Now click on adb.exe and it will open cmd and will start the adb server.
Now it will detect the device and no problem. OOOOOllllaaaaa.....
If the Problem persists again then do the same... save the folder
somewhere.... just replace files... it will detect the device
automatically then
I had this problem on Windows 8, but I solved the problem by updating all of Android Studio's plugins with the SDK Manager, then restarting the computer.
An another one: you might want to avoid running Eclipse and Android Studio together, it helped me.
I had this problem on Windows 7. My situation is this through SDK Manager. I only download API 19 but I had not downloaded related Android SDK build-tools. So it occur this problem.
I went through SDK Manager download build-tools 19 to fix it. Hope to give you help.
Faced this issue on Mac:
I have tried different solution, But below works for me -
Uninstall "Vysor" plugin if you have installed for Chrome
Under Home folder > find .Android folder and move to trash
Goto, Android sdk > delete/move to trash platform-tools folder
Again install/download from Android SDK Manager
Open terminal -
adb kill-server
adb start-server
Check adb devices, It will work and display you all connected devices.
Hope it helps !
there seems to be about a million reasons this bug happens, but for me (running on ubuntu), it was openvpn running in the background that caused it.
I killed the openvpn service and no more issues.
I've spent days trying to launch any Android program. Even "Hello World" gives me the same error:
"The connection to adb is down, and a severe error has occurred".
I'm running Eclipse v3.5 (Galileo), Google APIs 2.2.8, on a Windows XP machine.
I've used all the tricks I can find on the web: the command line "adb kill-server", the DDMS "reset ADB", I started the emulator both before and after Eclipse, and searched for ports being used by other programs.
What is going on here? Is there a magic combination of versions of Eclipse, Java, ADB, emulator, and whatever else that works?
Try the below steps:
Close Eclipse if running
Go to the Android SDK platform-tools directory in the command prompt
Type adb kill-server (Eclipse should be closed before issuing these commands)
Then type adb start-server
No error message is thrown while starting the ADB server, then ADB is started successfully.
Now you can start Eclipse again.
It worked for me this way.
Restart your phone as well!
Use:
Open Task Manager → Processes → adb.exe → End Process → restart Eclipse
This worked for me.
And:
Open Task Manager → Processes → eclipse.exe → End Process → restart Eclipse
Open up the Windows task manager, kill the process named adb.exe, and re-launch your program.
[2012-07-04 11:24:25 - The connection to adb is down, and a severe error has occurred.
[2012-07-04 11:24:25 - You must restart adb and Eclipse.
[2012-07-04 11:24:25 - Please ensure that adb is correctly located at '/home/ASDK/platform-tools/adb' and can be executed
I realized the folder of the project in Eclipse was closed. I expanded the directory and the project launched. I know this may sound like a "no-brainer". I had the .java files open on the workspace, and that was enough to make me think the project was open.
I tried this using Eclipse Juno and it worked fine:
From the dropdown of the Run icon, select option Run Configuration.
Make sure your project is selected
Go to tab Android
Under section Launch Action, select Launch Select the package name
and voila! try running your application.
UPDATE: It also helps to kill the process adb.exe from the task manager and restart it. adb.exe can be found here: Android\android-sdk\platform-tools.
Good luck
Update your Eclipse Android development tools. It worked for me.
Make sure it's not running in the task-manager processes. If so, end the process and then start it from a command prompt as in a previous answer. This worked for me.
In my situation: I have the same warning:
The connection to adb is down, and a severe error has occured
I have found the solution:
The adb.exe was moved from: android-sdk-windows\tools\adb.exe to
android-sdk-windows\platform-tool\adb.exe.
Only thing. Move file adb.exe to \tools. And restart Eclipse.
I know this question has already been answered, but thought I might add that I found the problem to be folder permissions on my android-sdk directory.
I tested it out by granting Full Control to Everyone (dodgy, I know...), and the problem went away. I am not sure yet what the specific mix of permissions might be that it was looking for, but I assume some or other service in Eclipse didn't have execute permissions on adb.exe. That said, I'm a complete noob to this - just wanted to put it out there in case someone else had some insights into this.
I am running Windows 7, 64-bit, 4.2.0 Eclipse, and 20.0.0v201206242043 ADT.
Go to the folder platform-tools in cmd folder platform tools available in the Android folder where you have Android backup files.
Type the following
adb kill-server
and
adb start-server
then type
adb devices
adb kill-server
You can now see your device.
This problem has been plaguing me for days until I finally figured out what was causing it. It got so bad I couldn't even update my apps even after trying all the above suggestions.
HTC Sync also runs a process called adb.exe. HTC Sync is an optional program available when installing the HTC USB driver. I had recently updated my installation of the HTC bundle and apparently hadn't installed HTC Sync before. Checking properties on adb.exe in the Task Manager showed it to belong to HTC Sync, not Android.
As soon as I uninstalled HTC Sync from the control panel the problem disappeared! (It's listed separately from the USB driver so that can stay.) I never saw more than one instance of adb.exe running. I'm curious to know if people having to kill the process from Task Manager, check to see if it's actually the Android process you are killing?
Please read user comments (I too have a HTC Thunderbolt):
http://www.file.net/process/adb.exe.html
Simply go in Task Manager (windows users) and kill the abd.exe (it is remaining active somehow).
After that start Eclipse.
The error
"The connection to adb is down, and a severe error has occured"
happened after installing plugin for Android of Netbeans. After closing Netbeans the process abd.exe remained active. When you want to start again Eclipse ... you will get the error.
You have to manually kill the adb.exe and then start Eclipse.
It worked for me.
I had the same problems, and it turned out that my antivirus program (Comodo) sandboxed the adb.exe, and that is why it didn't work. I closed the antivirus, and it worked just fine. Consider that.
My problem was that my firewall was preventing ADB from binding to the port it wanted to.
I had the same problem
I entered Task manager -> find adb.exe -> end process
Go to the Android SDK tools directory in Command Prompt double click adb.exe
That's all
I am running Eclipse Neon2. on Mac OS 10.12.4 and I experienced this issue after recently upgrading my Android SDK to the latest "SDK Tools" (v 25.2.5), "Platform tools" (v 26) and "Build Tools" (v 26) and moving one of my development projects to Android Studio.
Unfortunately none of the many answers here worked for me.
What did work was to create a separate copy of the Android SDK in a different folder and then point Eclipse to it via "Preferences --> Android". You will have to use an older version of the SDK as indicated in this SO answer.
Once you've downloaded the separate version of the SDK and put it in a different folder than your main Android SDK, launch the SDK Manager (via <separate-sdk>/tools/android) and install the required "Platform tools", "Build-tools" and Android versions. There are two important things to observe here though:
Make sure that you do not upgrade your "SDK Tools" beyond the version that's already installed!
Make sure that you install a version of the "Build tools" that is less than 26!
Otherwise you may run into this issue.
Go to the tools folder of your Android SDK
Run emulator.exe -avd <your avd>. It will take some time for the emulator to run.
Once you see the homescreen on your emulator, open Eclipse and run your program again...
I had a similar problem. I found out that there was another adb.exe running which was started from BirdieSync (Sync Tool for Thunderbird). I found out with Process Explorer from Sysinternals, that Windows was running another incompatible adb.exe. Just put the mouse cursor above the process (in Process Explorer), and you'll see which adb.exe is started.
I had to kill the BirdieSync process as well, because it started the wrong adb.exe again.
Then I could start the right adb.exe, and it worked fine.
The killing of the mysteriously running abd.exe worked. This sudden roadblock stopped me for a long time. I was doing all sorts of command line stuff and removed the lock icon from my user folder, but nothing worked until your simple suggestion of looking for the abd in the running processes of the task manager and killing it.
Another newbie roadblock I discovered an answer to: don't run Eclipse when any file other than the main .java file is active. If you run it when, for example, the main.xml file is active, you will get unhelpful error messages, an odd file created like main.xml.out, and it wont run.
I found the path of the SDK (Preferences* → Android → SDK Location) was the cause. My SDK path was the following:
C:\Program Files (x86)\Android\android-sdk
The spaces in the path is the problem. To get it to work, you must change Program Files (x86) to Progra~2
The complete right path is C:\Progra~2\Android\android-sdk.
Now it should work.
The previous solutions will probably work. I solved it downloading the latest ADT (Android Developer Tools) and overwriting all files in the SDK folder.
http://developer.android.com/sdk/index.html
Once you overwrite it, Eclipse may give a warning saying that the path for SDK hasn't been found, go to Preferences and change the path to another folder (C:), click Apply, and then change it again and set the SDK path and click Apply again.
Close Eclipse
Use this in the terminal:
sudo killall -9 adb
Run Eclipse.
If you are using the Genymotion emulator:
Make sure that the SDK path used for Genymotion is also the same path used for the Eclipse.
This error also occurs if those two paths are different.
I've tried the above methods, end the adb process through task manager and all, it didn't work. But when I ran the adb.exe file as admin it worked fine.
Here is a script I run to restart adb (Android Debug Bridge) server:
#!/usr/bin/env bash
## Summary: restart adb (Android Debug Brdige) server.
## adb binary full path
ADB_BIN=./adb
if pgrep adb >/dev/null 2>&1
then
echo "adb is running"
echo "terminating adb ..."
$ADB_BIN kill-server
if pgrep adb >/dev/null 2>&1
then
echo "did not work"
echo "kill adb processes by killall"
killall -9 adb
else
echo "terminated"
fi
else
echo "adb is not running"
fi
echo "starting adb ..."
$ADB_BIN start-server
echo "adb process:"
echo `pgrep adb`
echo "done"
# END
Last time I faced this problem, was solved with adb restart. If you have tried adb kill-server and adb start-server with no luck you might want to try this. When again I faced the same issue I tried all the above answers, with no luck, and this was the last option to try. It did work like a charm.
Goto Android SDK Manager >> Install the essential packages.
maydenec is correct (in my case...). The file was moved.
I even found this file:
C:\Program Files (x86)\Android\android-sdk\tools\adb_has_moved.txt
Which explained this issue.
Suggestions in this file:
Install "Android SDK Platform-tools".
Please also update your PATH environment variable to
include the "platform-tools/" directory.
It worked for me to start my AVD emulator first (from the AVD manager), and then to run my program. The other stuff mentioned here.
(Restarting the ADB server didn't work though.)
Eclipse → preferences → Android → NDK
Check the "NDK Location" path is set correctly, and use the browse button to set it.
AndroidSDK → Platform Tools → Kill did not work.
But after restarting my computer, it worked.