How to configure NDK for Android Studio
Asked Answered
S

1

20

I've installed Android Studio 2.2.3 and created a "myApplication" with include C++ support. I get this error:

Error:NDK not configured.
Download it with SDK manager.)

Is there any good way to solve it please?

Speedball answered 18/2, 2017 at 18:4 Comment(3)
Is it impossible? Hasn't anyone done it on the planet earth?Speedball
You did not say what you did in order to solve it - did you download the NDK? Did you tell your Android Studio where it is after you downloaded it?Dilapidation
Yes, I downloaded and installed android-ndk-r13b but how to tell it where it is? And also the NDK section does not exist in my Android Studio!!Speedball
D
58

Once you have downloaded the NDK, go to "File" menu, than "Project Structure->SDK Location" and set the Android NDK Location (it is at the bottom of the window).

Dilapidation answered 19/2, 2017 at 6:56 Comment(7)
I entered the path "C:\Users\CS\Desktop\Documents\Andro\android-ndk-r13b" there. Now I get: "Error:Failed to find CMake. Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake. Expected CMake executable at C:\Users\CS\AppData\Local\Android\Sdk\cmake\bin\cmake.exe.". Should I run that cmake.exe in its path?Speedball
OK, so it means now you have the NDK ready. You are facing another issue - if you haven't already, I suggest you look here: developer.android.com/studio/projects/add-native-code.htmlDilapidation
If you mean LLDB, CMake, and NDK,, they don't exist on my Android Studio! Please look.Speedball
Try to open standalone Android SDK Manager (there is a link at the bottom of the SDK window from where you took the screenshot) and go to Packages menu -> Reload. See if that helps.Dilapidation
I did this. No new packages were downloaded or installed! Please look at this image.Speedball
Thanks man. Using patience and creativity, the issue was solved. And your help was also considerable. (+1 and answer vote).Speedball
Good - I am very glad to hear that.Dilapidation

© 2022 - 2024 — McMap. All rights reserved.