In project settings (File -> Project Structure) 'Android NDK location' field is greyed out:
Clicking on 'Download Android NDK' briefly displays some dialog. There are several versions of NDK installed:
What is wrong with my setup?
Host: Ubuntu 18.04 LTS
Android Studio 4.1.1 Build #AI-201.8743.12.41.6953283, built on November 5, 2020 Runtime version: 1.8.0_242-release-1644-b3-6222593 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-128-generic GC: ParNew, ConcurrentMarkSweep Memory: 2014M Cores: 4 Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, debugger.watches.in.variables=false Non-Bundled Plugins: com.intellij.ideolog, org.jetbrains.kotlin Current Desktop: LXDE
Submitted bug report
ndkVersion '22.0.7026061'
in build.gradle(app) like this
externalNativeBuild { ndkBuild { path file('src/main/jni/Android.mk') } } ndkVersion '22.0.7026061' // your desire version dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) }
Extra Tips:--- you can set path variable here
Close Android Studio.
Delete .temp folder located
C:\Users\%USERNAME%\AppData\Local\Android\Sdk
(if exist)
Delete Options Folder located in
C:\Users\%USERNAME%\AppData\Roaming\Google\AndroidStudio4.1\
Delete NDK or ndk-bundle folder located in your SDK directory... in my case D:\Android\SDK\ndk
Now clean temps from SDK Manager > Optimize disk Space [don't worry it will not delete your essential files]
Now, install your desire NDK version from SDK Manager
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