There are lots of times Eclipse can't connect to emulator that I turned on from AVD Manager, and just starts a new emulator by itself,( two emulators are the same ):((. How can I make eclipse find the emulator ?
-
Use Android Studio. – TomeeNS Jul 13 '16 at 11:45
6 Answers
some times restarting adb solves your problem
adb kill-server
adb start-server
for working easier in command line in windows, add the path of adb.exe to that Windows' path. For example add ";C:\Program Files\Android\android-sdk\platform-tools" to System Properties-> Advanced-> Environment Variables-> System Variables-> Path
One of the reasons of problems in device connection is a long USB cable or a two-piece cables like keyboard USB. try to connect your device to PC directly by a short cable.

- 22,810
- 38
- 143
- 225
-
That is why programmers dont like Eclipse. Nothing works as it is supposed. My Android Emulator runs fine (started from within AVD Manager), my code has no errors but still I cant debug or run it. Eclipse (Neon) always says: [MY_AVD] disconnected, blah blah blah. – TomeeNS Jul 12 '16 at 12:57
I guess that you might suffer from the issue that the manually started emulator got disconnected somehow, shown with a message like
Error: emulator-5554 disconnected
in the Eclipse console view. There are several related questions and answers on stackoverflow like Why do I get a emulator-5554 disconnected message, but for me none of those answers helped.
Whenever I see the error message for disconnection occur, I just shutdown that emulator and start it again. Normally that already "fixes" the problem, it just works on the next attempt (for me).

- 1
- 1

- 21,797
- 8
- 68
- 88
I was just experiencing this issue also. I agree with breceivemail, the ADB reconnected to the emulated device after reset, but there is a shortcut using Eclipse:
In the DDMS view => Devices window => View Menu (the down triangle in the header) => reset adb

- 11
- 1
You can choose the target device manually by changing the run configurations.
Run -> Run configurations -> choose your App -> Target tab -> select "Always promt to pick device"
If your device isn't available you will at least don't start a new Emulator.

- 180
- 6
If the emulator is still active, you can use adb to connect to it via tcp. In this way you can connect a disconnected emulator to your development system's loopback one port higher, just like if you are using emulator-5554, you can connect to it by using a higher port.
adb connect localhost:5555
There was been an issue with this technique, where the emulator control becomes inactive, and the developer cannot send GPS coordinates or SMSs or calls to emulator.
There is a one click method to do this
- Open notepad
Type the below code
@echo off
adb connect localhost:5555
Save the file as your_file_name.BAT
- Copy the file to Android SDK/platform_tools
- Create a shortcut, give it a custom icon, use it anywhere you like

- 1,367
- 1
- 13
- 37
Open the DDMS view from Eclipse, and simply click on the emulator name you want connect to in 'Emulator' tab.

- 92
- 1
- 5
-
1if the emulator is disconnected from adb, in eclipse ddms view, emulator tab, not show the emulator. – ademar111190 May 08 '13 at 06:36
-
-
Check if there is another process of adb which was not started by Eclipse, if yes, kill that process first, then the emulator should be connected. – jasen.yin May 30 '13 at 00:34