Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimental Android Support

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.

Prerequisites

Android SDK

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).

Android NDK (r26d)

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"

Rust tooling

Install cargo-ndk and the required Android targets:

cargo install cargo-ndk
rustup target add aarch64-linux-android x86_64-linux-android

Building for Android

With Android Studio

Open 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.

Without Android Studio

From the ./AndroidApp/ directory:

./gradlew assembleDebug

The 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.

Running on Desktop

This example also compiles as a regular desktop app:

cargo run

Attribution

This 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages