I set default location for AndroidSDK and JDK, but I can't set location for Android NDK - the field is grayed out.
I downloaded NDK to some folder, set up ANDROID_NDK_HOME and NDK_HOME vars. What's wrong?
I set default location for AndroidSDK and JDK, but I can't set location for Android NDK - the field is grayed out.
I downloaded NDK to some folder, set up ANDROID_NDK_HOME and NDK_HOME vars. What's wrong?
I needed to install NDK for my react-native project, but same I couldn't set it up in android studio because it was grayed out...
Here is what worked for me (based on protossor answer in this post):
In android studio go to File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> and install NDK (Side by side)
Set up the enviromental virables NDK_HOME and NDK_MODULE_PATH (in my case both: C:\Users\piotr\AppData\Local\Android\Sdk\ndk\23.0.7123448 )
Finally in app/build.gradle change ndkVersion for exactly the one u have installed. For me like this:
Download zip folder from the link NDK LINK
Then Extract to the location of the drive
Set NDK path to the NDK option as shown in the above image
Hope it helps.
It was grayed for me too.
I fixed the problem by adding the NDK location to my local.properties
file, eg:
ndk.dir=/Users/myusername/Library/Android/sdk/ndk/22.1.7171670