Setup Expo Build Environment on WSL2 (Without Android Studio nor Paying Expo Credits)
These articles are AI-generated summaries. Please check the original sources for full details.
Setup Expo Build Environment on WSL2 (Without Android Studio nor Paying Expo Credits)
A developer reduced Android SDK bloat from 30 GB to 3 GB by installing only required components for local Expo builds, eliminating reliance on Android Studio and Expo Cloud credits.
Why This Matters
Expo Cloud Builds incur costs after a small free quota, but local builds offer unlimited free iterations. However, Android Studio’s 30 GB footprint includes unnecessary tools. By installing only the command-line SDK, build-tools, and NDK, developers achieve a lean environment that mirrors Expo’s CI setup, reducing resource overhead and build costs.
Key Insights
- “3 GB Android SDK install (2025)”
- “Node 20.19.4 for Expo CI alignment”
- “Maestro and Bundletool used for local testing”
Working Example
# Base dependencies
sudo apt update
sudo apt install -y build-essential git unzip zip curl wget ca-certificates openjdk-17-jdk
# Install Node 20.19.4 with NVM
export NVM_DIR="$HOME/.nvm"
if [ ! -d "$NVM_DIR" ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
fi
source "$NVM_DIR/nvm.sh"
nvm install 20.19.4
nvm alias default 20.19.4
# Android SDK minimal install
export ANDROID_HOME="$HOME/Android/Sdk"
mkdir -p "$ANDROID_HOME"
cd /tmp
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdtools.zip
mkdir -p "$ANDROID_HOME/cmdline-tools"
unzip -q cmdtools.zip -d "$ANDROID_HOME/cmdline-tools"
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/tools"
# Accept licenses and install core packages
yes | sdkmanager --licenses
sdkmanager "platform-tools" \
"platforms;android-35" \
"build-tools;35.0.0" \
"build-tools;29.0.3" \
"ndk;27.1.12297006" \
"extras;google;m2repository" \
"extras;android;m2repository"
Practical Applications
- Use Case: Local Expo builds for rapid iteration without Android Studio
- Pitfall: Missing
build-toolsversions can cause APK signing failures
References:
Continue reading
Next article
Simplicity in Product Design: Accelerating Development and Scaling
Related Content
Critical Security Alert: Node.js 18 and PHP 7.4 Reach End-of-Life
Millions of production apps are running on Node.js 18 and PHP 7.4, which reached end-of-life in 2025 and 2022 respectively, leaving them without security patches.
Mastering AWS Cloud Practitioner: Planning, Costs, and Architectural Pillars
Master AWS billing granularity and architectural pillars; the Cost & Usage Report provides the highest level of detail for BI tools and analysts.
Death by 1,000 Defaults: The Slow-Motion Car Crash Nobody Saw Coming
Modern software defaults compound into bloat and costs. A single 'hello world' API can balloon to 4 GB, costing more than a developer's rent in cloud bills.