File | Project Structure | Modules - module - Android facet
Use this page to configure individual settings of an Android facet attached to a specific module.
In this section:
Common Android Facet options
In this area, configure Android platforms to build the application against, choose the platform to use in the current module, and enable or disable sharing the module source code and resources.
|Library module||Select this check box to enable using the module as library project so Android application projects can reference its source code and resources.|
|Reset paths to defaults||Click this button to return to the default Android facet settings.|
In this tab, specify the location of the key application components in the module tree structure. Based on these settings, IntelliJ IDEA supports code completion, resolves references, and provides other types of coding assistance.
|Manifest file||In this text box, specify the path to the AndroidManifest.xml file. The AndroidManifest.xml file should be located in the module root directory.|
|Resources directory||In this text box, type the path to the folder where the application resources are stored. Resources located in this directory are assigned IDs and can be referenced through the R.java file or from XML resource definition files. The default location is <module root>/res.|
|Assets directory||In this text box, type the path to the folder where the application assets are stored. Files located in this directory are not assigned IDs and cannot be referenced through the R.java file or from XML resource definition files. You can access this directory like a normal file system and read data from these files using the AssetManager. The default location is <module root>/assets.|
|Native libs directory||In this text box, type the path to the folder where the Android native libraries.. The default location is <module root>/libs.|
In this tab, configure the behaviour of various Android compilation tools.
|R.java and Manifest.java files||
In this area, appoint the folder to store the R.java file
with the IDs of all the resources defined in your project and the AndroidManifest.java file with permissions.
Both files will be generated automatically based on the definitions of resources
and the AndroidManifest.xml file respectively.
By default, IntelliJ IDEA suggests to store the generated files in the gen folder. To change this setting, type the path to the required folder manually in the Directory for generated files text box or click the Browse button and select the folder in the dialog box that opens.
|AIDL files||In this area, appoint the folder to store the .aidl files generated by the AIDL Compiler. Accept the location suggested by IntelliJ IDEA in the Directory for generated files text box, or type the path to another folder manually, or click the Browse button and select the folder in the dialog box that opens.|
In this area, configure the behaviour of the tool that is responsible for creating an Android Package
.apk file and specify the location of components to be included in it.
In this area, enable the ProGuard tool to obfuscate the application
|APK Path||In this drop-down list, specify the target directory for the .apk file, which is obtained as a result of Android module compilation. Choose the APK path from the list or click the Browse button and choose the desired folder in the Select Path dialog box that opens.|
|Custom debug keystore||
In this text box, specify the location of the keystore to use the debug key from. Type path manually or click the Browse button
and appoint the location in the dialog that opens.
By default, debug keys are stored in <user home>/.android/debug.keystore>. When using builds created on different machines, they all have different signing, so you have to uninstall the existing application before installing the application from another machine. To solve this problem, keystore files are often stored in a version control system alongside the source code. To have IntelliJ IDEA use the repository keystore instead of the default one, specify the relevant location in the Custom debug keystore field.
|Include test code and resources into APK||Select this check box to include the sources and resources, located under the test roots, into the debug APK,
which is created in course of project build.
(Test data is never included in the release APK, which is created via the Export signed application package wizard.
Note that check box is cleared by default this for the regular Android modules; for the test modules this check box is selected by default.