Android Toolchain

Setting Up the Android Toolchain

A Cordova 129 app is a web app, but an Android build is a Java build. When you type cordova build android, the Cordova CLI copies your www folder into a generated Android Studio 234 project and hands that project to Gradle 19,597 , which compiles Java and Kotlin sources with the JDK, links resources against an Android SDK platform, and packages an APK with the SDK build tools. The emulator and adb then install and run the result. Every one of those pieces must be present, at a version the others accept, before your first build can succeed.

This section installs that toolchain once for the whole book: React Native, Capacitor and Android with Kotlin reuse the same JDK, SDK, Gradle cache and emulator. Every command below was run on Ubuntu 26.04 225 inside WSL2 6 on Windows 11, with KVM acceleration for the emulator; where Windows and macOS readers take a different route, usually Android Studio, the difference is spelled out.

The Android toolchain behind cordova build android
The Android toolchain behind cordova build android

Subsections