Debug native code in Android Library

android, android-library, android-ndk, debugging

Solution

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...

Peace

Problem

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?

Original source

Related problems