Reputation: 14337
I am using Windows 7 and JDK 6.
I downloaded the package of Android SDK with Eclipse and followed the instructions to create the first Hello World application.
However, when I stand on MainActiviy.java and click on run I get the following error in the console:
Connection with adb was interrupted You may want to manually restart adb from the Devices view.
I tried many answers that I saw here: 1. Restart adb server 2. Make sure that the path is to the correct JDK 3. I went over preferences and didn't see any warning or error.
I can run the emulator- and it works fine. But it doesn't run the Hello World application.
What is wrong?
Upvotes: 6
Views: 17144
Reputation: 4388
This always works for me. Follow these steps :-
- Close Eclipse.
- Kill adb.exe from Task Manager (Windows Only)
- Disconnect your device.
- Reconnect your device.
- Start Eclipse and Wait for Eclipse to build workspace.
P.S. This works perfectly on a Physical Device. I haven't tried it on Emulator.
Upvotes: 0
Reputation: 1
This worked for me:
simply go to device manager in your laptop or pc -> go to processes -> click on adb and -> click on end process.
Now go to sdk folder (it may be locate various location in your drive) and right click on adb.exe and click run as administrator.
Now check if it works fine.
Upvotes: 0
Reputation: 31
Expanding on Dejel's answer above with one change:
Upvotes: 3
Reputation: 1
I did some thing very simple.. I copied the adb.exe from users folder (users//android-sdks/platform-tools to tools folder under android-sdks.
Then in preferences under Android i clicked "restore Defaults" then again browsed back to C:\Users\\android-sdks then clicked on the latest API (19) clicked ok..
then it worked!!
Upvotes: 0
Reputation: 1
Me too had the similar problem. Struggled alot to resolve and finally this worked out for me.
Remove all the folders in the root folder of workspace(except workspace folder) like .android, .eclipse, .metadata etc
Save your platfoms to some safer place and delete the folder "adt-bundle-windows-x86-20130729"
Unzip the bundle again to some other locations
Try running the eclipse again and create an application
Run the application and see whether emulator automatically gets starting
Paste back ur platforms
This worked for me on my 4th attempt.
Upvotes: 0
Reputation: 77910
Here are followed list of options what you can do to try to fix that issue:
adb kill-Server
, after adb start-Server
You can try to up performance to your Eclipse (mostly for Android):
open eclipse.ini
and set:
-Xms128m
-Xmx512m
-XX:MaxPermSize=256m`
try to disable firewall
adb
through DDMSNew...
name: ADB
; value: <your android SDK path>\platform-tools
. after add to path %ADB%Upvotes: 3
Reputation: 14337
I had to go to DDMS view, and in view menu of the devices, to choose:
restart ADB.
This made everything work fine
Upvotes: 9