Android Initial Setup
This page provides an overview of the initial setup required for building Android applications using Mill.
1. Install Mill
Don’t have Mill installed yet? You can follow the steps as described in Installation & IDE Setup
2. SDK cmdline-tools
Mill requires the Android SDK cmdline-tools to build Android applications.
Ensure the $ANDROID_HOME environment variable is set (typically to ~/Android/Sdk).
Mill will automatically install and use the 19.0 version.
To use a different version, override cmdlineToolsVersion in your build.mill.
|
The SDK package licenses must be accepted before installing new packages.
If not accepted, Mill will throw an error with instructions.
You can also configure Mill to automatically accept the licenses by overriding |
AndroidSdkModule.cmdlineToolsVersion to specify a different version.object androidSdkModule0 extends AndroidSdkModule {
override def cmdlineToolsVersion = "17.0"
// Or
override def cmdlineToolsVersion = "latest"
// Automatically accept licenses
override def autoAcceptLicenses = true
}
|
This feature is still experimental.
If any issues occur with the automatic installation, you can manually install the |
3. Create a new Mill project
The structure of a Mill project and the relative Android commands can be found in the following pages:
If you want to start with an example project, you can use the init command as shown in this page.