Android Studio SDK location
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Android Studio needs to know where the Android SDK is installed before it can build, run, and debug apps. Most setup problems come from using the wrong path, moving the SDK after installation, or mixing IDE settings with environment variables.
Typical SDK Locations
The Android SDK is usually stored in a user-local directory rather than inside the project. Common default paths are:
If you are unsure, open Android Studio and check the SDK Manager or the project SDK settings. That is more reliable than guessing from an old tutorial.
Where Android Studio Stores the Path
For Gradle-based projects, the SDK location often appears in local.properties at the project root:
This file is machine-specific and is usually not committed to version control. One developer's SDK path should not leak into another developer's checkout.
Android Studio can also read SDK-related environment configuration, but local.properties is the most common project-level source when Gradle asks where the SDK lives.
How to Set or Fix the Location
Inside Android Studio, open the SDK settings and confirm the path points to the actual SDK folder containing directories such as platform-tools, build-tools, and platforms.
If you need to fix the project manually, update local.properties:
From the command line, it is also useful to export an SDK variable for tools such as adb:
That command verifies both the path and the availability of platform tools.
Recognize a Correct SDK Folder
A valid SDK directory is not just any folder named sdk. It should contain recognizable subdirectories. For example:
If those are missing, you may be pointing at the wrong location, or the SDK installation is incomplete.
Project Versus Global Configuration
There are two different problems people often mix together:
- telling Android Studio where the SDK is on this machine
- making command-line tools such as
adbavailable everywhere
The first is an IDE or Gradle configuration issue. The second is an environment setup issue. You often need both, but they are not the same setting.
For teams, the safest pattern is:
- keep
local.propertieslocal to each machine - avoid hard-coding developer-specific paths in shared Gradle files
- document the expected SDK installation path in onboarding notes
Finding the SDK Outside the IDE
If Android Studio is not opening cleanly, you can still verify the SDK location from the filesystem. On macOS and Linux, this is usually enough:
On a CI machine or a shared workstation, it is worth checking that adb, build tools, and platform packages all point to the same SDK root. Many "SDK not found" errors are really mismatches between a correct Android Studio setting and an outdated shell environment.
Common Pitfalls
The most common mistake is pointing sdk.dir at the Android Studio app directory instead of the actual SDK directory.
Another problem is committing local.properties. That makes the project brittle because the path is different on every machine and on CI.
A third issue is setting an environment variable correctly but forgetting that the project itself still has a stale local.properties value.
Summary
- Android Studio needs the path to the installed Android SDK, not just to the IDE.
- Check common default locations before assuming the SDK is missing.
- '
local.propertiesusually stores the project-local SDK path.' - Environment variables help command-line tools, but they do not replace project configuration everywhere.
- A valid SDK folder should contain directories such as
platform-toolsandplatforms.

