If you want to run local Android builds with Expo you'll need to set up a few things first. Here's how to get your Mac ready for local Android development.
Looking for iOS instead? Check out Setting Up Expo Local iOS Builds on a Fresh Mac.
Prerequisites
Install Java 17
Expo uses Java 17 (the Zulu distribution). I use mise to manage my Java versions:
mise use -g java@zulu-17You can verify the installation with:
java --versionYou should see something like zulu-17.62.17.0 in the output.
If you don't use mise, you can install Zulu JDK 17 directly from Azul's website or via Homebrew:
brew install --cask zulu@17Install Android Studio
Download and install Android Studio from the official website. During installation, make sure the Android SDK gets installed to the default location (~/Library/Android/sdk).
Configure Environment Variables
Add the following to your ~/.zshrc (or ~/.bashrc if you use bash):
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-toolsThen reload your shell:
source ~/.zshrcYou can verify the setup by running:
adb --versionIf it returns a version number, you're good to go.
Running the Build
Once everything is set up, run your local Android build with:
npx eas build --platform android --profile development --localThe first build will take a while as it downloads Gradle dependencies and compiles the native code. The output will be an APK file that you can install on your device or emulator.
To install the APK on a connected device:
adb install <path-to-your-apk>