How to change target emulator in Android Studio?
AndroidAndroid StudioAndroid EmulatorGenymotionAndroid Problem Overview
I have several genymotion emulators for different API levels. The problem is this:
- I run the app on a single emulator with the option 'same device for future launches' checked.
- I open another emulator.
- I run the the app again.
After this, the app only runs on the first emulator and I can't figure out how do I show the dialog (select target) again to run the app on both emulators.
Android Solutions
Solution 1 - Android
Click Run → Edit Configurations...
Then uncheck Use same device for future launches
As mentioned by @B-GangsteR, you can also launch your app on multiple devices at the same time. To do this, select targets using ctrl key.
Solution 2 - Android
Note that even if "Use same device for future launches" is unchecked, you can't launch app on other device while it is still running on first device. So you've got to
- terminate app on first device before running on another device,
- or kill adb process (it will restart),
- or run your app on multiple devices at the same time from the start (when choosing target, select multiple targets using 'ctrl' button or 'ctrl' + A)
Solution 3 - Android
In Android Studio 3.5 or above, the "Deployment Target" part of the configurations dialog has moved into the main toolbar.
Solution 4 - Android
Solution 5 - Android
Close the existing running app in all emulators to have this option even if the problem persist after doing configuration changes
Solution 6 - Android
You can change profiles by going to "Run" -> "Run..." -> "1.app" (click on the arrow) -> "Profile", then choosing which device (virtual or physical) you'd like to run on. This took me a while to find and I couldn't find anything like it in the answers above, so hopefully, I help someone out.
You can hold ctrl to select multiple devices (mentioned by @B-GangsteR).
Solution 7 - Android
In Android Studio 3.5, need to click on the Emulator name which is the left option of Run 'app' button.
You can select specific Emulator of your choice or multiple Emulator as well.