Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when i start eclipse and run android project, it opens a new emulator every time ,

Eclipse Android Emulator takes average 7 minutes to launch an activity ,its quite a long time Once emulator is Set ,Other projects can be run in same emulator which takes less times. Sometimes when i start eclipse and run android project, it opens a new emulator every time instead of installing the project in same emulator.

I have searched about this problem,I found the Single good Reason, Connection refused for the sensor ports is a common problem I am not sure , This is the real reason

I am using Eclipse for Windows,not Mac or Linux and previous activity is properly set before i run the next project

Help me to figure out, what can be the reason behind this problem and how can i make it normal.

like image 659
Charlie Avatar asked Jun 03 '13 17:06

Charlie


2 Answers

If you are running Eclipse with the ADT plug in what normally happens is (1) you run you project (2) it asks to to select an android device (3) if no device is available, e.g. a valid emulator, it will ask you to create one.

If Eclipse is asking you to creat a new emulator every time it is likley beacuse either (1) you have not selected the option on the pop up window indicating that you would like to always run the project in a specific listed instance of your emulator (2) there really is no compatable emulator available.

If an emulator is created but not being found (as I suspect is happeneing), you need to refresh your ADT plug in connectino to that emulator. You can do this from within eclipse by going to the devices view (window --> show view --> other --> android --> devices), selecting the downward facing triangle all the way on the right and choosing "reset adb". This will reboot the android device bridge, a.k.a. what connects eclipse to your emulator, and will allow it to recognize that instance again. You should be able to run your project on that emulator from then on.

like image 67
Rarw Avatar answered Nov 03 '22 23:11

Rarw


You can avoid starting emulator automatically by going to

run --> run configuration --> target tab. Then select "Always prompt to pick device." Run the project after this and select a different emulator device.

Here is a screenshot:

enter image description here

like image 21
Boulderbuff64 Avatar answered Nov 03 '22 21:11

Boulderbuff64