How to Fix Android SDK Not Found Error in Android Studio on Windows 11

The Android SDK not found error is one of the most common Android Studio and Flutter setup problems on Windows 11.

The error can appear even when Android Studio is already installed. In many cases, the Android SDK exists on your computer, but Android Studio, Gradle, Flutter, or your project is pointing to the wrong SDK directory.

You may see errors such as:

Code
Android SDK not found
SDK location not found
Android SDK is missing
Unable to locate Android SDK
SDK location not found. Define location with sdk.dir in the local.properties file
Android SDK command-line tools are missing
Android toolchain - develop for Android devices
X Android SDK not found

This complete guide explains how to fix Android SDK not found errors in Android Studio and Flutter on Windows 11.

We will check the actual SDK location, Android Studio SDK Manager, local.properties, environment variables, Command-line Tools, Flutter configuration, Android licenses, ADB, Gradle, and damaged SDK installations.

Quick Fix for Android SDK Not Found

If you want to try the most common solution first, open Android Studio:

Code
Tools → SDK Manager

Check the value shown under:

Code
Android SDK Location

On Windows, a common default Android SDK location is:

Code
C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

Then make sure your project's local.properties contains the correct path:

Code
sdk.dir=C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Android\\Sdk

For Flutter, run:

Code
flutter doctor -v

and confirm that Flutter detects the same Android SDK.

What Does Android SDK Not Found Mean?

Android Studio itself is an IDE. The actual tools used to compile, build, debug, install, and test Android applications are provided by the Android SDK.

The SDK contains components such as:

  • Android SDK Platforms
  • Android SDK Build-Tools
  • Android SDK Platform-Tools
  • ADB
  • Android SDK Command-line Tools
  • Android Emulator
  • system images
  • NDK and CMake when required

If Android Studio or Flutter cannot determine where these components are installed, it reports an Android SDK error.

Common Android SDK Not Found Error Messages

Android Studio Error

Code
SDK location not found

Gradle Error

Code
SDK location not found.
Define a valid SDK location with an ANDROID_HOME environment variable
or by setting the sdk.dir path in your project's local properties file.

Flutter Doctor Error

JSON
[!] Android toolchain - develop for Android devices
    X Android SDK not found.

Command-line Tools Error

Code
cmdline-tools component is missing

License Error

Code
Android license status unknown

These errors are related but do not necessarily have exactly the same cause.

Why Android Studio Cannot Find the Android SDK

The most common causes are:

  • Android SDK was never installed.
  • Android SDK path changed.
  • The SDK folder was manually moved.
  • local.properties contains an old path.
  • ANDROID_HOME points to the wrong folder.
  • Multiple Android SDK installations exist.
  • Command-line Tools are missing.
  • SDK installation is incomplete.
  • Flutter is detecting another SDK directory.
  • Windows username or folder location changed.
  • Android Studio was reinstalled without the SDK.
  • Gradle is using an outdated SDK configuration.

Step 1: Find the Real Android SDK Location

Before changing any environment variable, first determine where your Android SDK actually exists.

Open Android Studio and go to:

Code
Tools → SDK Manager

If you are on the Android Studio welcome screen:

Code
More Actions → SDK Manager

At the top of SDK Manager, look for:

Code
Android SDK Location

A typical Windows 11 path is:

Code
C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

Do not assume this exact path exists on every computer.

Your SDK could also be installed somewhere like:

Code
D:\Android\Sdk

or:

Code
C:\Android\Sdk

Step 2: Check Whether the Android SDK Folder Actually Exists

Open File Explorer and navigate to the SDK directory shown by Android Studio.

A normal SDK directory may contain folders such as:

Code
build-tools
cmdline-tools
emulator
licenses
platform-tools
platforms
sources
system-images

You do not necessarily need all of these folders, but a proper Android development installation normally contains several of them.

If the SDK path points to a folder that does not exist, Android Studio or your project is using an invalid SDK path.

Step 3: Install Android SDK if It Is Missing

If no Android SDK is installed, open:

Code
Android Studio → Tools → SDK Manager

Under SDK Platforms, install the platform required by your project.

Then open the SDK Tools tab and make sure important components are installed:

  • Android SDK Build-Tools
  • Android SDK Command-line Tools
  • Android SDK Platform-Tools
  • Android Emulator if required

Click:

Code
Apply → OK

Flutter's official Android setup guide also instructs developers to install the required SDK platform and Android development tools through SDK Manager.

Flutter Android Setup – Official Documentation

Step 4: Fix local.properties SDK Path

One of the most common Gradle errors is:

Code
SDK location not found.
Define location with sdk.dir in the local.properties file.

Open your Android project folder and locate:

Code
local.properties

In a Flutter project, it is normally inside:

Code
your_flutter_project\android\local.properties

Make sure it contains the correct SDK path.

Example:

Code
sdk.dir=C:\\Users\\John\\AppData\\Local\\Android\\Sdk

Why Are Double Backslashes Used?

Windows paths in Java properties files may require escaped backslashes.

For example:

Code
C:\Users\John\AppData\Local\Android\Sdk

can be written as:

Code
C:\\Users\\John\\AppData\\Local\\Android\\Sdk

Example local.properties for Flutter

A Flutter Android project may contain:

Code
sdk.dir=C:\\Users\\John\\AppData\\Local\\Android\\Sdk
flutter.sdk=C:\\src\\flutter

Your paths will be different depending on where Flutter and Android SDK are installed.

Do Not Copy Someone Else's SDK Path

A common mistake is copying something such as:

Code
C:\Users\Admin\AppData\Local\Android\Sdk

from a tutorial even though your actual Windows username is different.

Always use the Android SDK path from your own computer.

Step 5: Check ANDROID_HOME Environment Variable

Open Command Prompt:

Code
echo %ANDROID_HOME%

If configured correctly, you might see:

Code
C:\Users\John\AppData\Local\Android\Sdk

If it displays an old or invalid directory, update the environment variable.

How to Set ANDROID_HOME on Windows 11

Open:

Code
Start
→ Search "Environment Variables"
→ Edit the system environment variables
→ Environment Variables

Create or update:

Code
Variable name:
ANDROID_HOME
Variable value:
C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

Use the real path from Android Studio SDK Manager.

ANDROID_HOME vs ANDROID_SDK_ROOT

You may see old tutorials recommending:

Code
ANDROID_SDK_ROOT

Modern Android tooling primarily documents ANDROID_HOME.

The safest approach is to configure the current SDK location consistently instead of maintaining multiple environment variables that point to different folders.

Google documents Android SDK environment variables here:

Android SDK Environment Variables – Android Developers

Step 6: Add Platform-Tools to Windows PATH

Add:

Code
%ANDROID_HOME%\platform-tools

to Windows PATH.

This allows commands such as:

Code
adb

to work from any terminal.

Test:

Code
adb version

and:

Code
adb devices

Step 7: Add Command-line Tools to PATH

If you manually installed Android SDK Command-line Tools, add:

Code
%ANDROID_HOME%\cmdline-tools\latest\bin

to PATH.

Test:

Code
sdkmanager --version

For newer Android command-line workflows, Google also provides Android CLI, but existing Flutter and Android environments may still use Command-line Tools and sdkmanager.

Step 8: Restart Android Studio and Terminal

Windows applications do not always detect updated environment variables while they are already running.

After changing PATH or ANDROID_HOME:

  1. Close Android Studio.
  2. Close PowerShell and Command Prompt.
  3. Reopen your terminal.
  4. Restart Android Studio.

If necessary, restart Windows.

Step 9: Fix Android SDK Not Found in Flutter

Flutter developers should run:

Code
flutter doctor -v

Look for the Android toolchain section.

A healthy configuration may contain information similar to:

JSON
[✓] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\John\AppData\Local\Android\Sdk

If Flutter points to a different Android SDK from Android Studio, you have found the conflict.

Check What Flutter Is Detecting

Run:

Code
flutter doctor -v

Flutter's official documentation recommends using Flutter Doctor to validate the Android development environment.

Set Up Android Development for Flutter

Step 10: Configure Flutter Android SDK Path Manually

If Flutter is not detecting your installed Android SDK correctly, you can point Flutter to the correct directory.

Run:

Code
flutter config --android-sdk "C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk"

Then:

Code
flutter doctor -v

Use your actual SDK path.

Example

Code
flutter config --android-sdk "D:\Android\Sdk"
flutter doctor -v

Step 11: Fix cmdline-tools Component Is Missing

Sometimes Flutter detects the Android SDK but still reports:

Code
cmdline-tools component is missing

This means the SDK exists, but Android SDK Command-line Tools are not installed or cannot be located.

Open:

Code
Android Studio
→ Tools
→ SDK Manager
→ SDK Tools

Select:

Code
Android SDK Command-line Tools

Then:

Code
Apply → OK

Flutter's official troubleshooting documentation recommends this same SDK Manager approach for missing Command-line Tools.

Flutter Installation Troubleshooting

Manual Command-line Tools Folder Structure

If you installed the SDK manually, verify:

Code
C:\Android\Sdk\
└── cmdline-tools\
    └── latest\
        ├── bin\
        ├── lib\
        ├── NOTICE.txt
        └── source.properties

The following path should exist:

Code
C:\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat

A wrongly nested folder is a common reason Flutter cannot find the tools.

Step 12: Accept Android SDK Licenses

Once the SDK is detected, Flutter may report:

Code
Android license status unknown

Run:

Code
flutter doctor --android-licenses

Accept the licenses when prompted.

Then run:

Code
flutter doctor

Flutter's troubleshooting documentation recommends checking Command-line Tools before accepting licenses if the license command itself does not work.

Step 13: Check SDK Platforms

An SDK directory existing does not mean a usable Android SDK platform is installed.

Open:

Code
Tools → SDK Manager → SDK Platforms

Install the Android SDK platform required by your project.

You can also check your project:

Code
compileSdk

For example:

Code
android {
    compileSdk = 36
}

If the project compiles against API 36 but API 36 is not installed, Gradle may fail.

Step 14: Check Android SDK Build-Tools

Open:

Code
Tools → SDK Manager → SDK Tools

Verify:

Code
Android SDK Build-Tools

Modern Android Gradle Plugin versions can normally select a suitable Build-Tools version automatically.

Avoid manually forcing an old buildToolsVersion unless the project requires it.

Step 15: Check Platform-Tools

Make sure:

Code
Android SDK Platform-Tools

is installed.

This package contains ADB.

Verify:

Code
adb version

Step 16: Check Multiple Android SDK Installations

Multiple SDK directories are a common source of confusing errors.

You may accidentally have:

Code
C:\Users\John\AppData\Local\Android\Sdk

and:

Code
D:\Android\Sdk

and perhaps:

Code
C:\Android\Sdk

Android Studio may use one SDK while Flutter or Gradle uses another.

How to Detect SDK Conflicts

Compare these:

Android Studio

Code
Tools → SDK Manager → Android SDK Location

Flutter

Code
flutter doctor -v

Windows

Code
echo %ANDROID_HOME%

Gradle Project

Code
android\local.properties

Ideally, all should reference the intended SDK installation.

Step 17: Fix SDK Path After Moving Android SDK

If you manually moved the SDK from:

Code
C:\Users\John\AppData\Local\Android\Sdk

to:

Code
D:\Android\Sdk

you must update every relevant reference.

Check:

  • Android Studio SDK Manager
  • ANDROID_HOME
  • Windows PATH
  • local.properties
  • Flutter configuration

For Flutter:

Code
flutter config --android-sdk "D:\Android\Sdk"

Step 18: Fix SDK Location Not Found After Cloning a Project

You might clone an Android or Flutter project from GitHub and immediately see:

Code
SDK location not found

This happens because local.properties is normally machine-specific and is often excluded from Git.

Create:

Code
android\local.properties

and add:

Code
sdk.dir=C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Android\\Sdk

For Flutter projects, running:

Code
flutter pub get

and opening/building the project through Flutter tooling can also regenerate required local configuration in many cases.

Do Not Commit local.properties to Git

The file usually contains paths that are specific to one developer's computer.

For example:

Code
sdk.dir=C:\\Users\\John\\AppData\\Local\\Android\\Sdk

Another developer may have:

Code
sdk.dir=D:\\Android\\Sdk

This is why local.properties should generally remain local.

Step 19: Fix Android Studio SDK Path From Project Structure

If Android Studio itself is not using the correct SDK, open the project settings/module configuration and verify that a valid Android SDK is selected.

Flutter's Android Studio documentation also notes that when configuring Android support manually, the selected Android SDK should match the one reported by flutter doctor.

Flutter Android Studio and IntelliJ Configuration

Step 20: Try Gradle Sync Again

After fixing the SDK path:

Code
File → Sync Project with Gradle Files

or rebuild the project.

For a Flutter project:

Code
flutter pub get
flutter run

Should You Run flutter clean?

Only after fixing the actual SDK path.

Then you can try:

Code
flutter clean
flutter pub get
flutter run

flutter clean cannot fix a nonexistent or incorrect Android SDK path by itself.

Step 21: Restart Gradle Daemon

If Gradle still behaves as though it is using an old environment, stop the Gradle daemon.

From the Android directory:

Code
gradlew.bat --stop

Then rebuild:

Code
flutter run

Step 22: Check Java/JDK

Sometimes an Android SDK error appears together with Java or Gradle errors.

Run:

Code
java -version

and:

Code
flutter doctor -v

Flutter Doctor's verbose output can help identify the Java installation being used by Flutter.

Do not replace your JDK randomly unless the actual error indicates Java compatibility.

Step 23: Check Permissions

Avoid installing your manually managed SDK inside directories where your user does not have normal write permissions.

Good examples include:

Code
C:\Android\Sdk

or the standard user SDK directory:

Code
C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

The SDK Manager must be able to download and modify SDK packages.

Step 24: Repair an Incomplete Android SDK

If the SDK directory exists but important components are missing, do not immediately delete the entire SDK.

First open SDK Manager and reinstall:

  • Android SDK Platform
  • Android SDK Build-Tools
  • Android SDK Platform-Tools
  • Android SDK Command-line Tools

Then run:

Code
flutter doctor -v

When Should You Reinstall the Android SDK?

A complete reinstall should usually be a last resort.

Consider reinstalling when:

  • SDK directories are severely corrupted.
  • SDK Manager cannot repair packages.
  • important SDK metadata is missing.
  • multiple incomplete installations cannot be reconciled.

Before reinstalling, record:

  • SDK path
  • installed API levels
  • NDK versions if your project requires them
  • emulator/system images

Android SDK Not Found After Android Studio Update

If the error appears immediately after updating Android Studio, first check:

Code
Tools → SDK Manager

Verify that Android Studio still points to your existing SDK.

Do not immediately upgrade Gradle, AGP, Java, Flutter and Android SDK all at once.

For a safer upgrade process, read:

How to Update Android Studio Without Breaking Your Projects

Android SDK Not Found After Windows Reinstall

After reinstalling Windows, Android Studio may be reinstalled while an older SDK exists on another drive.

For example:

Code
D:\Android\Sdk

Instead of downloading everything again, you can configure Android Studio and Flutter to use the existing SDK directory if it is complete and valid.

Android SDK Not Found After Changing Windows Username

If your old SDK was located at:

Code
C:\Users\OldName\AppData\Local\Android\Sdk

but your current user directory is:

Code
C:\Users\NewName\

old project files or environment variables may still reference the old path.

Check:

  • ANDROID_HOME
  • local.properties
  • Flutter configuration
  • Android Studio SDK Manager

Android SDK Not Found in VS Code Flutter Project

VS Code itself does not provide the Android SDK.

Flutter still requires the Android toolchain to build Android applications.

Run:

Code
flutter doctor -v

If Flutter cannot find the SDK, configure it using the steps above.

If you need a complete Flutter setup guide:

Install Flutter on Windows 11 Step by Step

Android SDK Not Found Without Android Studio

You can use Android SDK without the Android Studio IDE.

In that case, you need to configure Command-line Tools and environment variables manually.

Read our detailed guide:

How to Install Android SDK Without Android Studio on Windows

How to Verify the Complete Android SDK Setup

Run these commands one by one.

Check Flutter

Code
flutter --version

Check Android Toolchain

Code
flutter doctor -v

Check ADB

Code
adb version

Check Connected Devices

Code
adb devices

Check Flutter Devices

Code
flutter devices

Check SDK Environment Variable

Code
echo %ANDROID_HOME%

Final Recommended Android SDK Configuration

A correctly configured environment may look like:

Code
Android SDK:
C:\Users\John\AppData\Local\Android\Sdk
ANDROID_HOME:
C:\Users\John\AppData\Local\Android\Sdk
PATH:
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\cmdline-tools\latest\bin
local.properties:
sdk.dir=C:\\Users\\John\\AppData\\Local\\Android\\Sdk

Flutter Doctor should report the same SDK location.

Common Mistakes to Avoid

  • Copying another developer's SDK path.
  • Deleting the entire SDK before diagnosing the problem.
  • Setting ANDROID_HOME to the Android Studio installation directory.
  • Pointing sdk.dir to platform-tools instead of the SDK root.
  • Using conflicting SDK paths in Android Studio and Flutter.
  • Forgetting to restart the terminal after editing PATH.
  • Missing Android SDK Command-line Tools.
  • Assuming flutter clean fixes SDK path errors.
  • Installing random Java versions to fix an SDK location problem.
  • Committing local.properties to a shared Git repository.

Frequently Asked Questions

How do I fix Android SDK not found?

Open Android Studio SDK Manager, identify the real Android SDK location, verify that the directory exists, and make sure your project, environment variables, and Flutter configuration point to the same SDK.

Where is Android SDK located on Windows 11?

A common default location is:

Code
C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

Your actual SDK location may be different, so verify it using Android Studio SDK Manager.

How do I find Android SDK location in Android Studio?

Open:

Code
Tools → SDK Manager

The Android SDK Location is displayed near the top of the SDK Manager.

How do I fix SDK location not found in Flutter?

Run:

Code
flutter doctor -v

If Flutter is using the wrong SDK path, configure the intended Android SDK and rerun Flutter Doctor.

What should sdk.dir contain?

It should point to the Android SDK root directory.

Example:

Code
sdk.dir=C:\\Users\\John\\AppData\\Local\\Android\\Sdk

Should sdk.dir point to platform-tools?

No.

Do not use:

Code
sdk.dir=C:\\Android\\Sdk\\platform-tools

Use the SDK root:

Code
sdk.dir=C:\\Android\\Sdk

What is local.properties?

It is a local project configuration file that can store machine-specific settings such as the Android SDK path.

Should local.properties be committed to Git?

Normally no, because SDK paths differ between development machines.

Why does Android Studio find the SDK but Flutter does not?

Flutter may be detecting an old SDK configuration or another SDK installation. Compare Android Studio SDK Manager with flutter doctor -v.

Why does Flutter find the SDK but say cmdline-tools is missing?

The SDK root exists, but Android SDK Command-line Tools are missing or installed in an incorrect directory structure.

Do I need ANDROID_HOME?

Modern tools can often determine the SDK through project configuration and standard locations, but ANDROID_HOME remains useful for command-line environments and scripts. If configured, it must point to the correct SDK root.

Can I move Android SDK to another drive?

Yes, but after moving it you must update Android Studio, environment variables, Flutter configuration, and project-specific SDK paths.

Will reinstalling Android Studio fix Android SDK not found?

Not necessarily. If the problem is an incorrect SDK path or local.properties, reinstalling the IDE may not fix it.

Can I install Android SDK without Android Studio?

Yes. Android SDK Command-line Tools can be installed separately.

Read: How to Install Android SDK Without Android Studio on Windows .

Related FlutterFever Guides

Official References

Conclusion

The Android SDK not found error usually does not require a complete Android Studio reinstall.

In most cases, the problem is caused by an incorrect or inconsistent SDK path.

The most important places to check are:

Code
Android Studio → SDK Manager
android/local.properties
ANDROID_HOME
Windows PATH
flutter doctor -v

All of these should point to the Android SDK installation that you actually want to use.

For Flutter developers, a good final verification sequence is:

Code
flutter doctor -v
flutter doctor --android-licenses
adb devices
flutter devices
flutter run

If Flutter Doctor detects the correct Android SDK, Android licenses are accepted, ADB can detect your device, and your Flutter project builds successfully, the Android SDK configuration is working correctly.

Avoid deleting SDK folders, changing Gradle versions, or installing random JDK versions before identifying the real cause. A correct SDK path fixes a large percentage of Android SDK detection errors without requiring a complete development-environment reinstall.