Skip to content
Latchkey

Android "NDK not configured" / "No version of NDK matched" in CI

A module with native code (or externalNativeBuild) needs the Android NDK. When the runner SDK has no NDK, or not the version the project pins, AGP fails the build and tells you to install it.

What this error means

The build fails with "NDK not configured. Download it with SDK manager." or "No version of NDK matched the requested version 26.1.10909125."

Android
> No version of NDK matched the requested version 26.1.10909125.
  Versions available locally: 25.2.9519653

Common causes

No NDK installed in the runner SDK

The native build requires an NDK that the SDK on the runner does not contain at all.

A pinned NDK version is not present

The project pins a specific ndkVersion and only a different version is installed locally.

How to fix it

Install the pinned NDK version

  1. Read the requested version from the error.
  2. Install that exact NDK with sdkmanager.
  3. Re-run the build.
Terminal
sdkmanager "ndk;26.1.10909125"

Pin ndkVersion to an installed one

Alternatively, set ndkVersion in the module to a version present on the runner.

app/build.gradle.kts
android { ndkVersion = "26.1.10909125" }

How to prevent it

  • Install the NDK version the project pins on the runner.
  • Keep ndkVersion in the build file aligned with the installed NDK.
  • Cache the NDK so it is not refetched every run.

Frequently asked questions

What causes ""NDK not configured""?
The native build requires an NDK that the SDK on the runner does not contain at all.
How do I fix "NDK not configured"?
Install the pinned NDK version

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card