Compatible side by side NDK version was not found. Default is 20.0.5594570

To install a specific version of the NDK, do the following:

With a project open, click Tools > SDK Manager.

Click the SDK Tools tab.

Select the Show Package Details checkbox.

Select the NDK (Side by side) checkbox and the checkboxes below it that correspond to the NDK versions you want to install. Android Studio installs all versions of the NDK in the android-sdk/ndk/ directory.


The Fix: add ndkVersion to your module's build.gradle

    android.ndkVersion  "your-installed-ndk-version"

as in some examples. You could find your NDK version from the file $NDK/source.properties.

Background Info: You probably using AGP/Android Studio version 3.6+: "From Android Gradle Plugin ( AGP ) 3.6+, there is a known good NDK concept added, which is the known good/tested NDK version when that AGP version was released". AGP will use that internal NDK version if:

  • you are not using the ndkVersion feature added in AGP 3.5

That internal NDKs are expected to be installed as side-by-side NDK place: $SDK\ndk
if not installed:

  • AGP 3.6, AGP 4.0 will error out
  • AGP 4.1 would auto install it.

The internally embedded NDK version, most likely, will be out-of-date pretty quickly as newer NDKs are constantly being released: if you want to use a newer NDK version, you do need to configure gradle with ndkVersion.

Additional Doc: Refer to the official documentation for details.