John Perry
John Perry

Reputation: 2678

How does one disable C/C++ support for a project in Android Studio?

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?

Upvotes: 6

Views: 4478

Answers (1)

ahasbini
ahasbini

Reputation: 6901

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.

Upvotes: 11

Related Questions