3

I have some new strange Eclipse behavior from yesterday. When I want to run an application and click on the green arrow (the run icon), it opens additional emulator copy instead to run application. I deleted from avd folder snapshot and user-data images, but I still have this bug. Any ideas why it happened and how I can solve this issue?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
tatiana_c
  • 948
  • 7
  • 16
  • 31
  • is your already running device shown in devices panel? – ingsaurabh Jan 06 '12 at 07:23
  • 2
    Try setting Run Configurations if you haven't tried it already. – Ghost Jan 06 '12 at 07:32
  • better run on a device instead of emulator ! – Snicolas Jan 06 '12 at 07:37
  • 1
    @Snicolas: Not a helpul comment. Many developers would like to have a box full of real devices running various versions of Android so they can test things. Unless you're personally prepared to fund everyone I guess people will just have to run with AVD emulation. – Squonk Jan 06 '12 at 08:05
  • Hi Insaurabh. Yes, I have one device that is already opened, but I put attention that this device is undefined in DDMS. – tatiana_c Jan 06 '12 at 11:31
  • Hi Ghost, I agree with you that I need an emulator. I tried to do it now as Sam.Janz wrote, but the bug is still happens. – tatiana_c Jan 06 '12 at 11:33
  • Hi CasperOne and Vincents. I understood, thanks. – tatiana_c Jan 06 '12 at 21:05
  • Thanks for all answers. I learned from them additional nice features. Finally, I reinstalled eclipse and sdk ( the only sdk reinstall didn't help). – tatiana_c Jan 06 '12 at 21:06
  • This question is allready answered in http://stackoverflow.com/questions/8041915/eclipse-keeps-starting-new-emulators – Oded Regev Aug 14 '12 at 08:27

2 Answers2

5

click on the down arrow beside that green play button and select the option "Run Configurations..." when window opens selct the tab "target" beside android tab and then below the line "Deployement Target Selection Mode" select the radio button having title "Manual" and the click "Apply" button which is at bottom and then close the window. so next time whenever you click the run button (Green Button with play icon) the eclips will ask you to run the project on a running emulator or start a new emulator to run project. i think this can solve your problem.

Umar Qureshi
  • 5,985
  • 2
  • 30
  • 40
  • Hi SamJanz.Thank you for very good and detailed explanation. I learned when I tried it the new eclipse features. It still same bug. But I put my attention that DDMS doesn't recognize any of opened devices. – tatiana_c Jan 06 '12 at 11:35
2
  1. Please verify that you are running the correct version of AVD.

  2. Please check if your adb is running properly.

Some times all you need to do is force restart your adb

use commands

adb kill-server

adb start-server

this should help, as its gonna restart your adb.

In case you are still not able to find the devices under ddms control try to see if your firewall if blocking the adb connection.

Abhinava
  • 1,030
  • 9
  • 19
  • Hi Abhinava, thanks for the answer. Where should I run these commands? In android-sdk/tools folder in cmd? – tatiana_c Jan 06 '12 at 11:43
  • You have to run this from the command prompt. If you already have the added adb to you env path, then from anywhere it should work or else from the android-sdk/platform-tools – Raa Aug 12 '13 at 06:32