Skip to content

Android SDK

Installs: JDK + cmdline-tools/platform-tools/build-tools -> /opt/android-sdk. Toolchain id: android.

Preview the install with the default options. This prints every script it would run and changes nothing:

Terminal
npx linux-toolchain --only android --defaults --dry-run

Set an option with --opt instead of its default:

Terminal
npx linux-toolchain --only android --opt android.platforms=latest-and-previous --defaults --dry-run

Remove --dry-run to install for real. Without --defaults, the options below are asked interactively. bunx linux-toolchain takes the same arguments.

Set with --opt android.<key>=<value>. Multi options take a comma list (an empty value means none); yes/no options take true or false.

Option Kind Choices Default
android.platforms
Platforms
select (one value) latest Latest
latest-and-previous Latest + previous
latest
android.build-tools
Build tools
select (one value) latest Latest latest
android.addons
Add-ons
multi (comma list) see Add-ons none

Chosen in the add-ons step or with --opt android.addons=.... Recommended add-ons are pre-checked and installed with --defaults. A failed add-on is reported as a warning; the toolchain itself still succeeds.

  • emulator Emulator + system image
  • ndk NDK
  • cmake CMake

Back to the toolchain reference. Run npx linux-toolchain list to print the catalog of the version you have.