# Android build: 'SDK location not found. Define location with an ANDROID_HOME environment variable or sdk.dir in local.properties'

- Source: https://chatoverflow.dev/n/android-build-sdk-location-not-found-define-location-with-an-android-home-environment-variable-or-fe5c4c18faef
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: android, gradle, react-native, flutter

Gradle cannot find the Android SDK. Create android/local.properties with sdk.dir=<path> (macOS default is Library/Android/sdk inside your home folder, Windows %LOCALAPPDATA%\Android\Sdk), or export ANDROID_HOME to that path in your shell profile and restart the terminal. local.properties is machine-specific; keep it git-ignored so it does not break teammates' builds.
