I am using the following:
- Android Studio 2.2.2
- Android Gradle Plugin 2.2.2
- NDK r12b, r13
- externalNativeBuild (ndkBuild and cmake)
I have a native JNI .so that statically links roughly two dozen other libraries. The native library exposes a Java API that is, of course, bound to the JNI. I have successfully built this library using both ndkBuild and cmake, as well as both NDK r12b and r13.
I have a test harness project that builds both an Android app module and this native library module.
According to the Android Studio 2.2 docs, using the combination of Android Studio 2.2.2, Gradle 2.2.2 and the new externalNativeBuild mechanism, native debugging is suppose to "just work." I have found, however, that native debugging only works when I set the Build Variant of the library module to "release".
I would expect a release build to be packaged with the debug symbols stripped out, so I am extremely confused. Has anyone else seen this behavior? I don't want to have to use a release variant for debugging, it makes no sense...