Warning
Android support is highly experimental. Soft keyboard and IME support are not yet implemented, so Input components and anything relying on keyboard input will not work properly on Android.
Install Android Studio (recommended) or the Android command-line tools. API level 36 is required.
Set the following environment variables:
export ANDROID_HOME="<PATH_TO_SDK>"If you installed Android Studio, the SDK is typically at ~/Android/Sdk (Linux), ~/Library/Android/sdk (macOS), or %LOCALAPPDATA%\Android\Sdk (Windows).
Download and extract the NDK for your platform:
Then set the following environment variables:
export ANDROID_NDK_HOME="<PATH_TO_NDK>/android-ndk-r26d"
export ANDROID_NDK="<PATH_TO_NDK>/android-ndk-r26d"Install cargo-ndk and the required Android targets:
cargo install cargo-ndk
rustup target add aarch64-linux-android x86_64-linux-androidOpen the ./AndroidApp/ project in Android Studio and click Run. If you have a device connected with ADB debugging enabled, the app will launch after a successful build.
From the ./AndroidApp/ directory:
./gradlew assembleDebugThe APK will be at ./AndroidApp/app/build/outputs/apk/debug/app-debug.apk. Install it via adb install or by copying it to your device.
This example also compiles as a regular desktop app:
cargo runThis experiment is inspired by an older attempt to add Android support to Freya by rebecca-src. You can see their original branch here: https://github.com/rebecca-src/freya/tree/experiment/android/examples/android