Run/Debug Configuration: Android Application
Use this dialog box to create configurations used to run or debug Android applications and activities on actual or virtual devices.
This dialog box consists of three tabs:
The dialog also provides a toolbar and the options that are common to all run/debug configuration types.
| Module || From this drop-down list, select a module to which this configuration will be applied. |
|Installation Options||Use this area to configure the following settings: |
- Deploy - use this drop-down list to appoint the
.apk file that will be deployed to the target virtual or physical device. You can select one of the following options:
- Default APK - select this option to have IntelliJ IDEA upload the
.apk built from the module specified in the Module drop-down list above. The
.apk is built automatically, no preliminary artifact configuration is required from your side.
- Custom Artifact - select this option to have IntelliJ IDEA upload the
.apk built from the code and resources appointed in a manually configured artifact. Select an artifact from the drop-down list which shows all manually created artifact definitions for the selected module. See Working with Artifacts for details.
- Nothing - select this option to suppress uploading data to the device. This approach may be helpful if you have already deployed your application manually outside IntelliJ IDEA.
- Install Flags - use this field to specify options for the
pm install command.
For more information, see the package manager page.
| Launch Options || In this area, appoint the activity that will be launched on the application start. |
- Launch - use this drop-down list to specify the following launch settings:
- Launch Flags - use this field to specify additional options for the
am start command.
For more information, see the activity manager page.
|Deployment Target Options|| In this area, select the type of device to run/debug the application on. The available options are: |
Selecting the Show Device 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.
- Emulator: select this option to use one of the configured device emulators. From the Prefer Android Virtual Device drop-down list, select a virtual device that will be used to run/debug the specified activity. If you want to add/edit a virtual device configuration, click the Browse button to launch the Android Virtual Device (AVD) Manager (see Managing Virtual Devices for details).
In this tab, configure the scope of log data shown during a run/debug session.
|Logcat||Use this area to configure logcat settings for your Android run/debug configuration:|
- Show logcat automatically: select this checkbox to show logcat automatically every time an application is deployed and launched successfully.
- Clear log before launch: select this checkbox if you want data from previous sessions to be removed from the log file before starting the application.
|Installation Options||Use this area to configure the installation options for running or debugging your Android application:|
- Skip installation if APK has not changed: select this checkbox to skip APK installation when you run your application if the APK has not changed.
- Force stop running application before launching activity: select this checkbox to stop running an already launched application before you start running the activity from IntelliJ IDEA.
In this tab, specify the Graphic Trace options.
|Disable precompiled shaders and programs||Select this checkbox if you want to disable precompiled shaders and programs and compile them at the runtime instead.|
|Name||In this text box, specify the name of a new run/debug configuration. This field is not available for the default run/debug configurations. |
|Defaults|| This node in the left-hand pane contains the default run/debug configuration settings. Select configuration to modify its default settings in the right-hand pane. The defaults are applied to all newly created run/debug configurations. |
|Share|| Select this check box to make the run/debug configuration available to other team members. |
If the directory-based project format is used, the settings for a run/debug configuration are stored in a separate .xml file in the
.idea\runConfigurations folder if the run/debug configuration is shared, or in the
.idea\workspace.xml file otherwise.
If the file-based format is used, the settings are stored in the
.ipr file for shared configurations, or in the
.iws file otherwise.
This check box is not available when editing the run/debug configuration defaults.
|Before launch||Use the controls in this area to specify which tasks must performed before applying the run/debug configuration. The tasks are performed in the order they appear in the list. The following options are available: |
- (Alt+Insert): click this icon to add a task to the list. Select one of the following task types:
- Run External tool. Select this option to run an application which is external to IntelliJ IDEA. In the dialog that opens, select the application or applications that should be run. If the necessary application is not defined in IntelliJ IDEA yet, add its definition. For more information, see Configuring Third-Party Tools andExternal Tools.
- Run Another Configuration: select this option to execute one on the existing run/debug configuration. Choose a configuration to execute from the dialog box that opens.
- Make: select this option to have the project or the module compiled. The Make Module command will be executed if a particular module is specified in the run/debug configuration, or the Make Project command if no modules are specified.
- Make, no error check: this option is the same as Make, the only difference being is that IntelliJ IDEA will start the run/debug configuration irrespective of the compilation result.
- Build Artifacts: select this option to build artifacts. Select the artifact(s) you want to build in the dialog that opens. For more information, see Working with Artifacts.
- Run Ant target: select this option to execute an Ant target. In the dialog that opens select a target that you want to build. For more information, see Ant.
- Run Maven goal: select this option to run a Maven goal. In the dialog that opens, select a goal that you want to run. For more information, see Maven.
- Run Gradle task: select this option to run a Gradle task. In the dialog that opens, select a task that you want to run. For more information, see Gradle
- If the Check errors checkbox is selected, the compiler will show all the errors and the run configuration will not start.
- If the Check errors checkbox is cleared, the compiler will show all the detected errors but the run configuration still will be launched.
- Run File Watcher: select this option to run the File Watchers that are active in the current project. For more information, see Using File Watchers.
- Generate CoffeeScript Source Maps. Select this option to have the source maps for your CoffeeScript sources generated. In the dialog that opens, specify where your CoffeeScript source files are located. For more information, see CoffeeScript.
- Run Remote External tool: select this option to run a remote SSH external tool. In the dialog that opens, specify the SSH external tool that you want to run. For more information, see Remote SSH External Tools.
- (Alt+Delete): click this icon to remove the selected task from the list.
- (Enter): click this icon to modify the selected task. Edit the task settings in the dialog that opens.
- (Alt+Up): click this icon to move the selected task up in the list.
- (Alt+Down): click this icon to move the selected task down in the list.
- Show this page: select this check box if you want to display the run/debug configuration settings before applying it.
- Active tool window: select this option if you want the Run/Debug tool windows to be activated automatically when you run/debug your application. This option is enabled by default.
Last modified: 7 February 2018