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?
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
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With