I right clicked my NDK project and chose "Link C++ project with gradle". I added Android.mk file there. "cpp" folder appeared. So far is fine.
Now I want undo this and assign the Android.mk path again, as I chose the wrong path earlier. How can I do this?
If you look at the build.gradle file of your module you will find an entry for linking to your native code in the following format :
externalNativeBuild {
ndkBuild {
path '../../../src/Android.mk'
}
}
either change the path here itself or get rid of it, re-sync the project and follow the same procedure for linking native project i.e. click on ""Link C++ project with gradle"
What you need to do is to manually configure your Gradle file in order to link to your native library in the way you want it and fix whatever you need to fix. You can see the exact directions here: Add C and C++ Code to Your Project, under the 'Manually configure Gradle' section.
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