Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection with adb was interrupted You may want to manually restart adb from the Devices view

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?

like image 565
Dejell Avatar asked Nov 14 '12 20:11

Dejell


3 Answers

I had to go to DDMS view, and in view menu of the devices, to choose:

restart ADB.

This made everything work fine

like image 89
Dejell Avatar answered Sep 23 '22 23:09

Dejell


Here are followed list of options what you can do to try to fix that issue:

  • Run: adb kill-Server , after adb start-Server
  • Try to disable and after set enable USB debugging on device. While doing that pulling out the USB cable and putting it back in also helps.
  • Just wait, sometimes it happens if it up slowly and Eclipse drop this error.
  • Try to kill adb.exe through Task Manager. It will restart by different way.
  • 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

  • Uninstall previous versions of JRE or JDK (if you have ones in additional to new that you currently use). After, restart Eclipse
  • Does DDMS see your emulator? Try to restart adb through DDMS
  • Also add (if still you didn't) ADB to global path: My Computer -> Properties -> Advanced System settings -> Environment Variables -> press New... name: ADB; value: <your android SDK path>\platform-tools. after add to path %ADB%
like image 38
Maxim Shoustin Avatar answered Sep 24 '22 23:09

Maxim Shoustin


Expanding on Dejel's answer above with one change:

  1. Window -> Open Perspective -> DDMS (DDMS could be in the "Other..." section)
  2. Window -> Show View -> Devices (if not already visible on the left pane)
  3. Under the view-meny (little downward-pointing triangle on "Devices" header) choose "Reset adb" (Restart may have been renamed to "reset" in newer versions).
like image 28
iPrash Avatar answered Sep 26 '22 23:09

iPrash