I am using Android platform 4.3 and sdk version 18. When I try to run the helloworld app, the emulator starts, and gets disconnected almost immediately. When I debugged the DDMS view by killing the adb and starting adb again and list the adb, it doesn';t show up any emulator. It throws the following exception:
[2014-08-19 16:08:32 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2014-08-19 16:08:33 - DeviceMonitor] Connection attempts: 1
[2014-08-19 16:08:59 - DDMS] device offline
com.android.ddmlib.AdbCommandRejectedException: device offline
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:774)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:396)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:347)
at com.android.ddmlib.Device.executeShellCommand(Device.java:609)
at com.android.ddmuilib.SysinfoPanel$1.run(SysinfoPanel.java:209)
at java.lang.Thread.run(Unknown Source)
Please help finding a solution to this issue on how to associate the emulator with adb.
Thanks.
Copyright Notice:Content Author:「Subhashni」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25379464/android-ddms-device-offline