SDK location not found Android Origin: On your device Last updated 13 Oct 2026

SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in local.properties

Gradle doesn’t know where the Android SDK is installed.

Exact message you may see SDK location not foundDefine a valid SDK location with an ANDROID_HOME environment variable
Seen on: Android

Meaning

local.properties (not committed) holds sdk.dir. Fresh clones, CI machines and command-line builds without ANDROID_HOME fail. React Native/Flutter projects hit it the same way.

Common causes

  • local.properties missing (fresh clone, CI)
  • ANDROID_HOME/ANDROID_SDK_ROOT not set
  • SDK not installed or moved

⚡ Quick fix

  1. Create local.properties with sdk.dir
  2. Set ANDROID_HOME in your shell profile/CI
  3. Install the SDK via Android Studio or sdkmanager

Detailed fix by platform

Shell

  1. kotlin
    echo "sdk.dir=$HOME/Library/Android/sdk" > android/local.properties
    export ANDROID_HOME=$HOME/Library/Android/sdk

How to diagnose

  1. File — local.properties present?
  2. Env — echo $ANDROID_HOME
  3. SDK — Folder exists?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

adb server version doesn't match — adb server version (41) doesn't match this client (39); killing... (Android)adb server version do…Android license status unknown / licenses not accepted — flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses (Flutter / Dart)Android license statu…Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource link…android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar no…author identity unknown — Author identity unknown *** Please tell me who you are. (Git)author identity unkno…aws: error: argument — aws: error: argument command: Invalid choice / Unknown options (AWS)aws: error: argumentCannot fit requested classes in a single dex file — Cannot fit requested classes in a single dex file (# methods: 65536 > 65536) — mergeDex failed (Android)Cannot fit requested …cmdline-tools component is missing — flutter doctor: Android SDK is missing command-line tools; download from https://goo.gl/XxQghQ — cmdline-tools component is missing (Flutter / Dart)cmdline-tools compone…SDK locat…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.