Every now and again, I make the mistake of trying to enable C/C++ support in an Android Studio project. I think that I might like to use C/C++, but I forget that, at least on my system, I've never once been able to get it to work, even after downloading the NDK library.
I've looked around for how to remove C/C++ support from a project, but it seems the only things you can find are questions (and answers) on how to enable/disable NDK support, rather than how to remove the support from a project.
So, how does one do that?
The Android Native Development Kit (NDK): a toolset that allows you to use C and C++ code with Android, and provides platform libraries that allow you to manage native activities and access physical device components, such as sensors and touch input.
Android is based on Linux Kernel so it's definitely possible to compile & run C/C++ programs on Android. C is quite cross-platform , so a C Program written in Windows can Run on Linux ( and android ) and vice versa.
Project structure settings To change various settings for your Android Studio project, open the Project Structure dialog by clicking File > Project Structure.
Removing the externalNativeBuild
blocks within the build.gradle
app file should do the trick. Also look for any System.loadLibrary("native-lib");
calls within your java code and remove their relative static
block.
A more intensive cleanup would be to additionally delete the CMakeLists.txt
and any C/C++ code from the project.
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