In my Android project, using the latest Gradle build tools, I have a single file with native C code and a few simple function. The only thing included in the C file is string.h and jni.h and the functions simply return String and primitives. The file is placed in the jni directory besides the other source folders (java, res etc.).
When I build the application, it compile the C code, generates the .so file and includes it in my APK. The problem is that the .so file has ALL symbols stripped.
When inspecting the intermediate .so file placed in build/intermediate/ndk/obj, all the symbols are still there. So somewhere after the first .so file is generated and when it gets packaged, everything is stripped.
When building the .so file using the command line ndk-build, everything works fine and the symbols are included.
Is it a bug in the Android Gradle plugin (I'm using the latest!) or am I missing something?