如何在Android库项目中调试本机代码? [英] How to debug native code in an Android library project?
问题描述
当应用程序项目正在使用时,我想调试库。
我很确定库(makefile,build命令,编译器选项)项目中的设置是确定的,因为我在库内尝试了调试器(我创建了一个虚拟的Activity并取消设置库)它工作。我也知道由于加载动态库所需的时间可能会发生延迟,我不认为这是同样的原因。
应用程序项目,我刚刚添加本机代码支持将构建命令设置为 ndk_build NDK_DEBUG = 1
,但它从不在断点处停止。任何想法都将不胜感激
在我的问题中尝试Jay的答案:调试Android库中的本地代码。
我没有时间用自己来测试,但是看起来很有希望。
让我知道如果它有效。
I am developing an Android library with native code. This library project is added as a library in an application project.
I would like to debug the library when the application project is using it.
I am pretty sure the settings in the library (makefiles, build command, compiler options) project are ok because I tried the debugger from within the library (I created a dummy Activity and unset "library") and it worked. I am also aware of the delay that might occur because of the time needed to load the dynamic library and I don't think it's the issue for the same reason.
In the Application project, I just added native code support set the build command as ndk_build NDK_DEBUG=1
, but it never stops at breakpoints. Any idea would be greatly appreciated
Try the answer by Jay in my question: debug native code in Android library. I had no time to test it by my self, but it looks promising. Let me know if it works.
这篇关于如何在Android库项目中调试本机代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!