I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:
Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:
android { sourceSets { main { jni.srcDirs = [] } } }
to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs
so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders
/libs
/obj/local
so which folders from above two contain the actual .so files to be copied?
And do I have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!
libs
folder. There can be total 4 folder will create if you follow ndk compilation. under each folder you can place your.so
fileobj/local/
has everything you have compiled includingo.d
and executable file but lib has only.so
file. i.e obj/local has a fresh copy of.so
file. These is the default environment used for compilation. NDK_LIBS_OUT=./Libs NDK_OUT=./obj