I have a PDFViewer module in my project, depending on an android library module libPDF. The native code is included in the library module (in the jni
folder) along with appropriate android code. I am using Gradle experimental 0.3.0-alpha4 (same problem with 0.2.0 and 0.2.1). There are native files from libraries outside of jni
folder - they are included using android.sources
and their headers with CFlags
in android.ndk
. The library is compiled into a .so file and included in the apk.
The project compiles and runs using a default debug native configuration for PDFViewer, the debugger is started with a warning:
Attention! No symbol directories found - please check your native debug configuration.
When debugging no breakpoints in the native code (and java code) are hit. If I pause the debugger the execution is in a function called epoll_wait
.
I don't know if this matters but in Android Studio 1.3.2 I get
Throwable: LLDB server not found
in the Event Log. If I try with GDB it throws an exception too. I'm building only armaebi-v7a version. In the given samples I don't see any special gradle code to include debug info for the native code. Or am I missing something?
Do I need to add symbol directories myself from the native configuration options? What are these directories and how to find them? The example samples don't show this warning when debugging and there are no symbol directories set in their native configuration options.
debuggable
, jniDebuggable
, ndk.debuggable
flags are set to true, android:debuggable = true
is in the manifest, CFlags += "-g"
is in the ndk
block, none of these work.
Any ideas? Thanks in advance.
Edit: Here is a Github link with an example sample I wrote to show you the problem. If you try to debug the native code in the library with native configuration, no breakpoints will be hit.
The new Gradle experimental 0.3.0-alpha6 doesn't solve the problem. Others have this issue too. The gradle plugin is still an alpha version, so maybe native debugging for libraries is still not implemented?