如何调试本地code在Android库项目? [英] How to debug native code in an Android library project?

查看:128
本文介绍了如何调试本地code在Android库项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发与本地code一个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.

我是pretty确保在库中的设置(生成文件,建立命令,编译器选项)的项目都OK,因为我从图书馆(我创建了一个虚拟活动和取消库),并在尝试调试工作。我也知道延误的可能,因为加载动态库所需的时间发生,我不认为这是出于同样的原因的问题。

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.

在应用程序项目,我只是说原生code支持设置构建命令,如 ndk_build NDK_DEBUG = 1 ,但在断点它从不停止。任何想法是极大的AP preciated

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

推荐答案

尝试通过周杰伦的回答我的问题:的调试本土code在Android的库
我没时间由我自己来测试它,但它看起来很有希望。
让我知道,如果它的工作原理。

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.

这篇关于如何调试本地code在Android库项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆