Device chooser dialog is not showing up after instant run

后端 未结 6 906
盖世英雄少女心
盖世英雄少女心 2020-12-20 11:49

In Android studio 2.0 after first app launch on emulator it seems that run process is attached to it. But if I connect device and want to test app,

6条回答
  •  没有蜡笔的小新
    2020-12-20 12:15

    This behaviour is clearly a shortcoming that's going to be fixed in subsequent releases, there's an open issue at AOSP.

    Right now I found two workarounds that don't require studio restart or killing the adb process:

    1. Force close the app on the device you have the ongoing instant-run session. This way the session will be closed and you will be asked to choose the device after next run.

    2. Press the "debug" button if you've pressed the "run" button before and vice versa. For some reason, changing from run to debug or from debug to run forces AS to close the instant run session.

提交回复
热议问题