Skip to content

Android

Before you can develop for Android you’re first going to need the general system setup for desktop development.

Set up Desktop development now!

I know what you’re thinking, “why the heck do I need to install an IDE to build for Android??” And while I might point you to both Mac and iOS that both depend on Xcode, the real reason option 1 and the recommended approach is getting Android Studio is because it’s a more standardised approach and debugging your Android project regardless of what other IDE you’re using is simply going to be easier using the dedicated IDE straight from Google.

  1. Install Android Studio
  2. Add the following to ~/.zshrc:
Terminal window
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
  1. Add the Android targets using rustup:
Terminal window
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

WIP

WIP

Terminal window
adb devices

WIP

Terminal window
adb devices

Terminal window
# Create a basic app by spamming enter
pnpm create tauri-app --beta
# Install dependencies
cd tauri-app
pnpm install
# Initialize the Android project
pnpm tauri android init
# Run the app
pnpm tauri android dev

References