Development issue/problem:

I’m completely new in Android development and I just installed Android Studio. I do a very simple exercise with HelloGL2 and open the file HelloGL2.iml. I tried to run it, but it said that the synchronization of the Gradle project had failed and that the NDK had not been configured. In the simplest sense (for a complete beginner on Android), how can I solve this problem?

How can I solve this problem?

Solution 1:

I checked if I had already installed the latest version of NDK (so it wasn’t a solution for me). Here’s what I’ve done now: Android Studio Menu -> File -> Project Structure -> SDK Location. There is no NDK selected here, so I have chosen the latest version. That solved the problem.

Give here a description of the image

This fix only works locally for that specific machine and project by writing your selection in the local .properties file at the root of your project.

UPDATE: There is also a way to define it globally via the environment variable ANDROID_NDK_HOME. This is what I call building my project on the build server:

export ANDROID_SDK_ROOT=/home/jenkins/Android/Sdk/ ; export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/21.0.6113669 ; ./gradlew assembleRelease

Solution 2:

Disclaimer : I work on Android Studio

With the new version (3.6+) of the Android Gradle plugin, you can download with the NDK option (side by side) from the SDK manager and then specify ndkVersion in build.gradle with the full version of NDK available locally on your machine.

If you z. B. If you downloaded the NDK 20.1.5948944 as NDK (Side by Side) from the SDK Manager, the downloaded NDK will be saved under ~/Android/Sdk/ndk/20.1.5948944 by default. You’ll need something like this in your build.gradle module layer.

android {
compileSdkVersion 29

defaultConfig {
// …

buildTypes {
// …

externalNativeBuild {
// .

ndkVersion 20.1.5948944 //

Solution 3:

You can install these components using the SDK Manager :

  1. In the project that opens, select Tools > Android > SDK Manager from the main menu.
  2. Switch to the SDK Tools tab.
  3. Check the box next to NDK, CMake and LLDB.
  4. Click on Apply

(With Android Studio 3.6.1)

Edit: By following the above procedure, later versions of Android Studio will always have an error when uninstalling the NDK during the building process. Violet Giraffe’s answer solved the problem. After installing the required files, go to the File > Project structure > SDK menu and select the NDK version.

For more information, please refer to this manual.

Solution 4:

1 – Android Studio -> Tools -> SDK Manager -> Select SDK tools

2 – Check the boxes next to LLDB, CMake and NDK.

3 – Accept and press the OK button .
Describe picture here .

Solution No 5:

If you see this error, it is possible that the NDK is not in your SDK.

It is therefore best to download it here and copy all folders and files to the SDK.

You can also go to :
Open Project>Select Extra[top]>Android>SDK Manager[from main menu]>Click on the SDK Tools tab> and check the box next to NDK.

If you do not have the NDK in the SDK Tools tab, you can automatically download it to this folder.

Solution No 6:

With android studio 3.0+ this problem is solved differently.

Go to File > Settings > Android SDK > and select Input SDK and Update. That should solve the problem.

Another approach to the same problem is that when you synchronize a listed project, it automatically detects a problem that requires a version update and provides you with a link to click in the console. During these steps you may also be asked to update other dependencies, such as B. CMake.

Solution No 7:

I came across this error when trying to run SQLite Android Bindings. It still uses a very old configuration of degrees (see below).


Follow the advice of Protosser and use NDK (Side by Side) and place ndkVersion in your build.gradle. Use it only for very old projects.

For older projects you need to install the old SDK via the SDK Manager. In Android Studio, open the SDK Manager and select the SDK Tools tab. Uncheck Hide obsolete packages and scroll down to find the NDK (obsolete).

More information

Android Studio, SDK Manager, SDK Tools tab, Hide obsolete packages Unchecked, NDK (obsolete) checked

I ran ./gradlew assembleRelease according to the instructions and got the following:

SAFETY : The design failed with one exception.

There was a problem setting up the :sqlite3 project.
> NDK is not configured.
Download it from the SDK manager.

Execute the –stacktrace option to get a stacking track. Use the –info or –debug option to get more output data. Run a… scan to get the full picture.

* For more help, visit


I had a similar error in Android Studio when I tried to configure a project. After the installation of the NDK package (depreciated) everything is configured correctly.

A frustrating and outdated staging configuration in SQLite :


Builds the script {
repositories {
dependencies {
classpath ‘’.

// NOTE : Do not place your application dependencies here, they belong to
// in separate build.gradle
} module files.

$ROOT/sqlitetest/build.gradle :

android {
compileSdkVersion 25

defaultConfig {
minSdkVersion 16
versionCode 1
versionName 1.0

Solution No 8:

For Android Studio 4.0, add this to :


Solution No 9:

It worked!

  1. Go to SDK Manager > android sdk (left) > SDK Tools
  2. Download or update the NDK(side_by_side) and CMake if available.

3. Now press OK or apply
. Go back and click Install NDK ‘21.0.6113669’ and synchronize the project in the failed build.

Happy coding

Solution No 10:

For Linux :
Create a local .properties file:


Now close the project and re-import it.

Good luck!

error configuring android studio,failed packages ndk ndk bundle,android ndk unknown,android gradle ndk version is unknown,error ndk not pointing at a directory,android-ndk location is not valid,android_ndk_home,what is ndk,ndk is missing a "platforms" directory.,android studio sdk manager,executing external native build for ndkbuild,android ndk download,android ndk tutorial,ndk-build command not found,install ndk/21.0 5935234 and sync project,no version of ndk matched the requested version,gradle sync failed: failed to sync sdks,update ndk version to 21.3.6528147 and sync project,execution failed for task ':app:extractreleasenativesymboltables'. > ndk is not installed,ndk not configured download it with sdk manager update ndk version to 21.2 6472646 and sync project,update ndk version to 21.0.6113669 and sync project

You May Also Like

5 best VPNs for Thailand to access restricted web resources

Matthew AdamsWinds and software expert. Thailand is a popular tourist destination, but…

Hapi, Error 415 : Unsupported Media Type error –

Application Programming Interface (API) Problem: I’m trying to send a json feedData…

How to set Unit Test to Fragment in Android

Development issue/problem: I would like to test the Android fragment class. Can…

Best Mic For ASMR To Record Great Quality Sound- Expert Guide [2021]  

This website analyzes in detail Best Mic For ASMR To Record Great…