NDK is not installed
Solution 1
I got that error on React Native 0.64 app on AppCenter build for Android.
The solution is to go to android/app/build.gradle
file and comment ndk { debugSymbolLevel 'FULL' }
line if you have so (defaultConfig { ndk { debugSymbolLevel } }
)
The solution was found by my colleague Jose, so all credits to him)
Solution 2
I had the same issue. I wanted to extract the debug symbols for better debugging in the production environment.
Solution
Step 1: Installing NDK
and CMAKE
SDK tool from android studios (You can skip it, if already installed)
Open any project in Android studio. (Doesn't matter which project. We just want to access SDK manager)
-
With a project open, click
Tools > SDK Manager
. -
Click the SDK Tools tab.
-
Select the NDK (Side by side) and CMake checkboxes.
Image of SDK Manager
-
Click OK.
-
A dialog box tells you how much space the NDK package consumes on disk.
-
Click OK.
-
When the installation is complete, click Finish.
Step 2
1. Check which version of NDK is installed in your system.
To check, find the NDK folder inside the Android SDK folder. For mac users, it is located at - ~/Library/Android/sdk/ndk/
You will find a folder with the NDK version name inside this directory.
For example - in my case, the installed NDK version was 23.0.7599858
. So, I was able to find this directory at this location ~/Library/Android/sdk/ndk/23.0.7599858/
Note: For Ubuntu or windows users sdk/ndk
directory's location will be different.
2. Ensure you have the same NDK version mentioned in the android/build.gradle
file.
buildscript {
ext {
...
ndkVersion = "23.0.7599858" # the installed version of ndk.
}
...
}
EDIT:
Make sure you have ndkVersion
initialized in the app/build.gradle
like this:
android {
...
ndkVersion rootProject.ext.ndkVersion
...
}
Or you can also directly write the version here like this:
android {
...
ndkVersion "23.0.7599858"
...
}
You don't have to add the ndkVersion in android/build.gradle
if you do this.
Comments
-
Nailuj29 over 1 year
When building a flutter app, I get an error stating
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:extractReleaseNativeDebugMetadata'. > NDK is not installed * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 822ms
However, the android NDK is installed.
-
Nailuj29 almost 3 yearsim using flutter, but my solution was very similar, so I'll accept this
-
JCutting8 almost 3 yearsAlthough this solves the error, I don't think its a very good solution to the problem. Having debug symbols is important. How about providing informatino about how to install the missing NDK?
-
Abhinav Kaushal Keshari over 2 yearsThis is not a solution
-
Kumar Aditya Mohta over 2 yearsHey, please check the other answer by me, had the same issue, finally solved it in the right way.
-
Sahil over 2 years@Nailuj29 this seems to be the right answer. Please accept this.
-
dan-gph over 2 yearsSpecifying the ndkVersion as above didn't work for me. This worked: stackoverflow.com/a/59275504/60620
-
dan-gph over 2 yearsOn Ubuntu my ndk was located here:
~/Android/Sdk/ndk
. You can also check the "Show Package Details" checkbox in theTools > SDK Manager
to see the installed version of ndk. -
Randolfo over 2 yearsIt worked for me