Is there no easy way to change my deployment target when instant run is enabled? For example, I have two emulators running at the same time on my mac, one is genymotion API 22 and one which is genymotion API 16.
I have already unchecked this box as I would like to deploy my build to my api 16 emulator:
But the Play icon with the flash still appears in the toolbar and when I click it, it just deploys to my genymotion API 22:
I have to go into Preferences, then search for "instant run", and then untick the box that says "Enable instant run" before I can move my build to API 16.
Is there no easier way to change deployment target when instant run is enabled?
By default, Instant Run is enabled when you first install Android Studio. Uncheck the "Enable Instant Run to hot swap code/resource changes on deploy (default enabled)" option and then click on the "OK" button to disable Instant Run.
We Want Your Feedback! Instant Run is currently available only in Android Studio 2.0, and higher. We will continue to improve the feature in subsequent releases. If you run into any additional issues, please help by logging bugs in our public Issues Tracker.
Clicking on stop "app"
button works for me - you get to choose a different target device, but at the cost of application being killed on the current device.
The button looks like this:
Another option is to switch to debug "app"
(if you're currently running
your app), or run "app"
(if you're currently debugging
) - you'll get a dialog asking whether it is fine to restart the app, and once you "ok" this dialog you'll get to choose the next deployment target (note that you don't actually have to deploy debug
version - all you had to do is "ok" the dialog).
I'm pretty sure that this small, but very annoying problem will be solved soon.
Vasily's answer didn't work for me. What I found is disconnecting the device your working with. When it's a real mobile device disconnect the usb cable, when working with the emulator quit the emulator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With