Android build

Android SDK location not found

Android SDK not found

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

Updated

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. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.

Other Android build errors

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.

  • Free to start
  • No credit card
  • Sign in with Google or GitHub