- To start configuration creation, choose on the main menu. Alternatively press Alt+Shift+F10Alt+Shift+F10 and choose Edit Configuration from the pop-up menu.
- Click the Add New Configuration button on the toolbar and choose Android from the pop-up list.
- On the Run/Debug Configuration: Android page that opens specify the configuration name, choose the module and the activity to apply the current configuration to.
In the Target Device area, specify the device to launch the application on or appoint the method for choosing this device.
To specify the target virtual device for deployment within the configuration, select the Emulator option and choose the desired virtual device from the
Prefer Android Virtual Device drop-down list.
If none of the existing virtual devices is applicable, create a new device.
- To enable manual selection of the target device during the running/debugging procedure, select the Show chooser dialog option. When you launch the configuration, IntelliJ IDEA will open the Choose Device dialog box, where you will be able to select the relevant device.
- To have IntelliJ IDEA detect a plugged in USB device upon the application start, select the USB device option.
Selecting the Show chooser dialog or USB device option may be helpful if you are going to run the application on a physical device which will be plugged in later and therefore the set of available devices cannot be foreseen.
- To specify the target virtual device for deployment within the configuration, select the Emulator option and choose the desired virtual device from the Prefer Android Virtual Device drop-down list.