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."
> No version of NDK matched the requested version 26.1.10909125.
Versions available locally: 25.2.9519653Common 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
- Read the requested version from the error.
- Install that exact NDK with sdkmanager.
- Re-run the build.
sdkmanager "ndk;26.1.10909125"Pin ndkVersion to an installed one
Alternatively, set ndkVersion in the module to a version present on the runner.
android { ndkVersion = "26.1.10909125" }How to prevent it
- Install the NDK version the project pins on the runner.
- Keep
ndkVersionin the build file aligned with the installed NDK. - Cache the NDK so it is not refetched every run.