Run app on currently running emulator (Android)

2020-02-13 03:57发布

问题:

I am beginner to Android. I have an emulator running currently. I created an android app. When I run that app, it starts starting a new emulator and running in that new emulator. But, I want to run that app in the same emulator that is being run.

回答1:

Open the run configuration you created, select the "Target" tab. Choose the radio button "Launch on all compatible devices/AVDs". Switch the combo box below that radio button to "Active AVDs".

This will start your app on all currently running emulators.



回答2:

If you don't have any device under the Target section. You can try to restart the AVD manager. to do this open your command prompt and enter the following command:

adb kill-server

this will stop the AVD Manager service.

then enter:

adb start-server

or

adb logcat

to start the service again. Then check if you can add your AVD as a Target.



回答3:

try going into the "Run Configurations" via the arrow attached to the run button in Eclipse.

then. under "Target" you can choose the "Always prompt to pick device".
this will allow you to choose any running emulator or device.