Android: SDK location not found
Gradle cannot find the Android SDK, so the Android build stops at once.
01What you see
> 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 '/Users/admin/t/edemo/android/local.properties'.
From our own run of cd android && ./gradlew assembleRelease (with ANDROID_HOME unset and no local.properties)
02Why it happens
Gradle looks for the Android SDK in ANDROID_HOME, or in sdk.dir in android/local.properties. That file is usually not committed, because it holds a path from the developer's own computer, so on a build machine it has to come from the environment.
03The fix
On MacBuildCloud the Android SDK is installed and ANDROID_HOME already points at it, so this only happens if a build step unsets or overwrites it, or a committed local.properties points at a path from someone's laptop. Leave ANDROID_HOME as it is and do not commit local.properties. With the variable in place, our test built the release APK in 2 minutes 22 seconds:
cd android && ./gradlew assembleRelease --no-daemon -q && cd ..
04How we checked
On 25 November 2026 we started a fresh machine from our default image (Xcode 27.2), made a new project, caused this error on purpose with the command above, then ran the fix until it built. We do the same before adding any page to this list.
More on this kind of project: the guide. Other errors: Common errors. Still stuck? Send the build URL to support@macbuildcloud.com.