Debug native code in Android Library

前端 未结 2 854
再見小時候
再見小時候 2020-11-28 11:14

My workspace layout is:

.
├── ApplicationLibrary
│   ├── AndroidManifest.xml
│   ├── ...
│   ├── jni
│   ├── libs
│   ├── ...
│   └── src
└── Application
            


        
2条回答
  •  孤独总比滥情好
    2020-11-28 11:42

    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:

    1. Go to "Run" menu-> "Debug Configurations"
    2. Under "Android Native Application" in the left pane, select your application
    3. Under the "Debugger" tab click "Add..." in the "Shared Libraries" section.
    4. Browse to your android library project directory and add its subdirectory obj/local/armeabi.
    5. Apply and debug.

    That seemed to work for me. Hopefully, you'll have the same luck...

    Peace

提交回复
热议问题