4

I set default location for AndroidSDK and JDK, but I can't set location for Android NDK - the field is grayed out.

Disabled NDK path editing

I downloaded NDK to some folder, set up ANDROID_NDK_HOME and NDK_HOME vars. What's wrong?

Bohdan Bessonov
  • 408
  • 7
  • 21

3 Answers3

1

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):

  1. In android studio go to File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> and install NDK (Side by side) enter image description here

  2. 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 )

  3. Finally in app/build.gradle change ndkVersion for exactly the one u have installed. For me like this: enter image description here

0

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 NDK IMAGE

Hope it helps.

Vinayagam.D
  • 322
  • 3
  • 10
0

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
Albert Vila Calvo
  • 15,298
  • 6
  • 62
  • 73