# Android SDK location not found

> Getting the error “Android SDK location not found”? Here is how to fix it. Gradle has no ANDROID_HOME and no local.properties pointing at the SDK.

**Android SDK location not found.** Gradle doesn’t know where the Android SDK is installed on the build machine.

- Android build. Android SDK not found.
- Interactive page: https://capwr.app/free-tools/build-error-explainer/android-sdk-location-not-found
- Build error explainer: https://capwr.app/free-tools/build-error-explainer
- Last updated: 2026-10-03

## What this error means

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

## Why it happens

Gradle looks up the Android SDK through ANDROID_HOME or android/local.properties. Neither is set on this machine, so the build cannot find platform tools.

## The message tools print

```
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 at '/home/runner/work/harbor/harbor/android/local.properties'.
```

## How to fix it

1. Set the ANDROID_HOME environment variable, or add sdk.dir to android/local.properties on that machine — don’t commit it.
2. On GitHub Actions, add the android-actions/setup-android step, or use a runner image that ships the SDK.

## Check a log that shows this

Paste the failing step into the [build error explainer](https://capwr.app/free-tools/build-error-explainer). It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

## Other Android build errors

- [Android Gradle plugin requires Java 17 to run](https://capwr.app/free-tools/build-error-explainer/android-gradle-plugin-requires-java)
- [:capacitor-android project could not be found](https://capwr.app/free-tools/build-error-explainer/capacitor-android-project-could-not-be-found)
- [Android resource linking failed](https://capwr.app/free-tools/build-error-explainer/android-resource-linking-failed)
- [Keystore was tampered with, or password was incorrect](https://capwr.app/free-tools/build-error-explainer/keystore-was-tampered-with-or-password-incorrect)
- [Duplicate class found in modules](https://capwr.app/free-tools/build-error-explainer/duplicate-class-found-in-modules)
- [Could not resolve all files for configuration](https://capwr.app/free-tools/build-error-explainer/could-not-resolve-gradle-configuration)

## Let the Android build run in CI

CapWrapp builds the release on GitHub Actions with the JDK and Android SDK the project needs, and signs it with the upload keystore it stores for you.

[Get started free](https://capwr.app/login).

## About CapWrapp

CapWrapp turns a web app on GitHub — built with Lovable, Bolt, Base44, Cursor or by hand — into iPhone and Android apps. It adds Capacitor if the repo needs it, signs the builds, and ships them to TestFlight and Google Play from GitHub Actions, with no Mac or Xcode on your side. [Get started free](https://capwr.app/login) · [Lovable to App Store guide](https://capwr.app/guides/lovable-to-app-store)
