Quick fix: "Please select Android SDK" means Android Studio cannot find a valid SDK for your project. Most of the time a Gradle sync fixes it: choose File > Sync Project with Gradle Files. If the error stays, open Settings > Languages & Frameworks > Android SDK, make sure Android SDK Location points to a real folder, and check that sdk.dir in local.properties matches it (steps 2 and 3).
Type "android studio error" into Google and the first suggestion is "please select android sdk". The message appears in the run configuration dialog, or as a red warning when you press Run, usually right after you clone a project, open someone else's project, switch computers or upgrade Android Studio. Its cousin in the Build window says:
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.
Both errors have the same root problem, and the fixes below solve both. They are ordered from quickest and safest to most involved. Rerun the app after each step.
Why "Please select Android SDK" happens
To build an app, Android Studio needs three things to line up: the SDK folder on your computer, the path the project uses to find it, and an installed SDK platform that matches the compileSdk in your build file. The error appears when one of them is off:
- The project was not synced after cloning, upgrading or switching branches, so the IDE has an outdated picture of the project.
- The SDK path is wrong.
local.propertiesstill holds a path from another computer or user, or the SDK was moved or deleted. - The SDK platform is missing. The project compiles against an API level you have not installed.
- A module has no SDK. This is common with imported projects and Flutter projects, where a module's SDK setting points to a platform that is not on disk.
- The IDE caches are corrupted, for example after a crash during indexing.
How to fix the Please select Android SDK error
- Sync the project with Gradle files. Choose File > Sync Project with Gradle Files, or click the elephant Sync icon in the toolbar. Wait for the Build window to say the sync finished, then press Run again. This alone clears the error in many Stack Overflow reports.
- Check the Android SDK location in Settings. Open File > Settings (Windows and Linux) or Android Studio > Settings (macOS) and go to Languages & Frameworks > Android SDK. Older versions list it under Appearance & Behavior > System Settings > Android SDK. The Android SDK Location field must point to a folder that exists. The default locations are:
Click Edit, pick the folder, apply the change and sync again.Windows: C:\Users\<you>\AppData\Local\Android\Sdk macOS: /Users/<you>/Library/Android/sdk Linux: /home/<you>/Android/Sdk - Fix
sdk.dirin local.properties. Openlocal.propertiesin the project root. Thesdk.dirline must point to the same SDK folder:
A path from another machine is a very common cause after cloning a repo. Correct it, or delete the line and let Android Studio write it on the next sync. This file is machine-specific, so keep it in# Windows (backslashes and the colon are escaped) sdk.dir=C\:\\Users\\you\\AppData\\Local\\Android\\Sdk # macOS sdk.dir=/Users/you/Library/Android/sdk.gitignore. On a CI server or the command line, set theANDROID_HOMEenvironment variable instead. - Install the SDK platform your project compiles against. Look up
compileSdkin your module'sbuild.gradle.kts(orbuild.gradle), then open Tools > SDK Manager. On the SDK Platforms tab, install that API level. On the SDK Tools tab, make sure Android SDK Build-Tools and Android SDK Platform-Tools are installed. Click Apply, then sync. - Set the module SDK in Project Structure. For imported projects and Flutter projects, open File > Project Structure. Check the SDK under Project and under Modules; if a module shows no SDK or one marked as missing, choose an installed Android API platform from the drop-down, click Apply and restart Android Studio. Flutter users should also run:
flutter config --android-sdk "/path/to/Android/Sdk" flutter doctor -v - Invalidate caches and restart. Choose File > Invalidate Caches, then click Invalidate and Restart. Android Studio rebuilds its indexes and project model, which helps when the settings look right but the error will not go away.
- Re-import the project as a last resort. Close the project, back up and then delete the
.ideafolder in the project root, and open the project again with File > Open. Android Studio regenerates its project files from Gradle. You may need to set up run configurations again if they were stored only in.idea.
If nothing works
Run ./gradlew assembleDebug (or gradlew assembleDebug on Windows) from the project folder. If the command-line build fails with "SDK location not found", the problem is the path (steps 2 and 3). If it builds but Android Studio still complains, the problem is the IDE's project model (steps 5 to 7). You can also update Android Studio with Help > Check for Updates and follow Google's guide to reporting Android Studio bugs to search for or file your exact message.
Once the app builds, you might hit the next common error, "No target device found". Our no target device fix guide covers it. Flutter users who see "Gradle task assembleDebug failed" can follow the assembleDebug fix guide. New to Android? Start the free Android with Kotlin track.
Frequently asked questions
What does Please select Android SDK mean in Android Studio?
It means the run configuration or module has no valid Android SDK attached, so Android Studio cannot build or run the app. The SDK path may be wrong, the SDK platform may be missing, or the project has not been synced.
Where is the Android SDK installed by default?
Android Studio installs it in %LOCALAPPDATA%\Android\Sdk on Windows, ~/Library/Android/sdk on macOS and ~/Android/Sdk on Linux, unless you chose a different folder during setup.
How do I fix SDK location not found in Gradle?
Gradle needs the SDK path from sdk.dir in local.properties or from the ANDROID_HOME environment variable. Set one of them to your SDK folder, then sync the project again.
Why does the error appear after opening a Flutter project?
Flutter projects opened in Android Studio sometimes keep a module SDK setting that does not match your installed platforms. Set the module SDK in File > Project Structure, and run flutter config --android-sdk with your SDK path if flutter doctor cannot find it.
Should I reinstall Android Studio to fix it?
Usually not. The SDK path, the installed platforms and the project files cause this error, not the IDE itself. Try every step in this guide first; reinstalling should be the very last option.
Sources
- Android Developers: Update the IDE and SDK tools (SDK Manager)
- Android Developers: Environment variables (ANDROID_HOME)
- Android Developers: Troubleshoot Android Studio (Invalidate Caches)
- GeeksforGeeks: Different ways to fix the "Select Android SDK" error
- GeeksforGeeks: How to fix "SDK location not found" in Android Studio
- Stack Overflow: Error "Please select Android SDK" (most-voted answers)
- GitHub flutter/flutter-intellij issue 6908: Android SDK platform not found
Last checked December 1, 2026. Menu names can differ slightly between Android Studio versions; the steps match current stable releases.