Debugging Android NDK C/C++ code in Eclipse - breakpoints are not hit

后端 未结 6 642
遥遥无期
遥遥无期 2020-12-01 14:59

I downloaded Android SDK Bundle for Linux and Android NDK. ADT was installed, I installed CDT.

I created a Android project and added native support (jni). Then I wro

6条回答
  •  悲哀的现实
    2020-12-01 15:44

    I had this issue, and the only thing that worked for me was putting

    Thread.sleep(2000);
    

    before the JNI library is loaded. This gave enough time for the debugger to attach before the call to System.loadLibrary crashed the app. Helped me to locate the problem C++ code.

提交回复
热议问题