How to configure NDK for Android Studio - android-studio

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?

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

Related

Why is android studio not opening?

I try to open android studio but it says
Failed to open JVM DLL if you have JDK installed set JAVA_HOME variable....
I set the JAVA_HOME variable, downloaded new jdk
set it to that and redownloaded android studio but nothing is working.
It says to install Microsoft Visual C++ Redistributable
Installing it provides a "missing vcruntime140_1.dll file in bundled Java Runtime" to the Android Studio.
read - https://issuetracker.google.com/issues/247854802?pli=1
buddy hopes you are doing great this crash happens when an awful java path is changed or deleted.
This same error I already faced when the new update I downloaded to Android Studio Electric Eel | 2022.1.1
To solve this you need to change the path from the environment or you should delete the old java and download the new JDK and give the path.
You should follow this answer: https://stackoverflow.com/a/27113946/19674027 for better understanding
Happy Coding...

Android Studio native library build - NDK clang permission problem on Mac

Trying to build a native C library in Android Studio 4.0 on a Mac. But getting this pop-up when I do:
"clang" cannot be opened because the developer cannot be verified. macOS cannot verify that this app is free from malware.
Of note: I downloaded NDK r21 and point to it in Android Studio. Also, in the Android SDK setup, I have NDK (side-by-side) installed. I have to admit I am not clear what NDK is pointed to when one checks NDK (side-by-side)? That is why I downloaded NDK r21 and pointed to it in Android Studio. But now, this NDK clang permission problem...
thanks for any advice.
Best,
Steve
OK - I went to, in Android Studio, File -> Project Structure, and removed the PATH I had for the Android NDK Location box. And kept the NDK (side-by-side) box checked in the SDK Manager, SDK Tools tab section. Now not seeing the clang issue.

Android Studio C++ Support Missing

I just installed Android Studio 3.6.3 on Windows 10 and I created a new Native C++ project. I can build and run the native project and I can debug Java code in the project.
The problems I'm having are:
I can't step into the C++ code when debugging
I can't set breakpoints in *.cpp files.
When I right click folders in the project view to add a new file, I only see options to add Java, Kotlin, and Android platform files. There aren't any options to add C++ source or header files.
When I open a C++ file Android Studio recommends installing plugins supporting *.cpp. The plugin it's recommending is for Arma 3 plugin development.
The "Attach Debugger To Process" menu only has Java as a debugger option. That list should also contain Native, Dual, and Auto.
I've made sure to install CMake and NDK (Side By Side) in the SDK Manager and I've configured the NDK in the project settings. I've tried reinstalling Android Studio 3.6.3 and I've also downloaded Android Studio 4.0 RC 1, but I have the same problems.
What steps am I missing to get C++ support in Android Studio?
Managed to get it working. Turns out just running the uninstaller wasn't enough, I had to follow the steps in this answer to completely uninstall Android Studio. I then reinstalled and everything seems to be good.

In my Android Studio SDK Manager Tools there is no NDK, LLDB, CMake

I follow this Install and configure NDK document:
In this step,
I found in my Android Studio there is no NDK, LLDB, CMake and so on:
EDIT-01
I found many disable sites in my SDK Updates Sites:
The Android update site is either disabled or has an error (not sure exactly what that icon means; if you mouse over it there might be a tooltip). You need to fix that. You can't download things from the repository if all of your repositories are disabled.

Android studio and SDK installing error

using Android studio 3.1.2
I installed JDK last version , then installed Android studio 3.1.2 . when I run android studio for a fist time , it ask me about sdk path and the massage is "if you dont have the android SDK you can optain it from this link.".
Error shortcut:
https://drive.google.com/file/d/1_DyaOYIOzVJ79ixVpuoViZUyAt-s2b9s/view?usp=sharing
I downloaded the SDK tool pacake (sdk-tools-windows-3859397.zipf) from that link(https://developer.android.com/studio/) but what is the next step ?
when i tried download SDK from SDK manager it also shows this error massage "Your Android SDK is missing, out of date or corrupted."
Error shortcut:
https://drive.google.com/file/d/1HurRBB90wPUgzH1V31L5930QEbxRB_Bq/view?usp=sharing
How can I fix this problem ?
thank you
Download Sdk from here https://developer.android.com/studio/#downloads and Extract this zip to C:\users\administrator\AppData\Local\Android\sdk. Do not forget to replace "administrator" by your current user on windows.
Open Android studio and click on configure. See here Configure button
Click on Sdk Manager
Set the Sdk Path to C:\users\administrator\AppData\Local\Android\sdk
Update your android studio now. Go to About -> Check for Updates.

Resources