Android: Changing deployment target when instant run is enabled
Asked Answered
F

2

6

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:

enter image description here

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:

enter image description here

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?

Freeboard answered 14/4, 2016 at 17:29 Comment(1)
see my answer : https://mcmap.net/q/715577/-android-studio-2-0-launch-apk-on-another-device.Postcard
D
8

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: stop app button

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.

Deon answered 7/5, 2016 at 5:29 Comment(1)
Didn't work for me. I just disconnect the cable or quit the emulator.Fenella
F
1

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.

Fenella answered 2/2, 2017 at 11:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.