My workspace layout is:
. ├── ApplicationLibrary │ ├── AndroidManifest.xml │ ├── ... │ ├── jni │ ├── libs │ ├── ... │ └── src └── Application ├── AndroidManifest.xml ├── ant.properties └── ...
How can I debug the native library in Eclipse? Has anyone some hint about this?
I was able to set breakpoints and debug native code in an android library on eclipse by adding the directory of the unstripped shared library/libraries to the debugger in the debug configurations dialog:
- Go to “Run” menu-> “Debug Configurations”
- Under “Android Native Application” in the left pane, select your application
- Under the “Debugger” tab click “Add…” in the “Shared Libraries” section.
- Browse to your android library project directory and add its subdirectory obj/local/armeabi.
- Apply and debug.
That seemed to work for me. Hopefully, you’ll have the same luck…
It is possible:
Update your build config to include “NDK_DEBUG = 1”.
Right click project -> properties -> C/C++ Build:
Set a breakpoint in your C code.
Right click on your project, select Debug As -> Android Native Application
For more details follow: