简体   繁体   English

如何调试原生Android应用程序?

[英]How to debug a native Android app?

I've installed the Sequoyah Android Native Support , and now, I can execute the debug mode. 我已经安装了Sequoyah Android Native Support ,现在,我可以执行调试模式。 I have a breakpoint in the same line where I call a native method, so when I execute the debug Java mode, eclipse stops in this line, I execute the 'ndk-gdb', and I lunch the C/C++ debug mode, I see the console do something. 我在同一行中有一个断点,我称之为本机方法,因此当我执行调试Java模式时,eclipse在此行停止,我执行'ndk-gdb',我在C / C ++调试模式下午餐,我看到控制台做了些什么。 But, how can I put C breakpoints? 但是,我怎么能把C断点? Because my C code is a .so library, so I can't put breakpoints in this file. 因为我的C代码是.so库,所以我不能在这个文件中放置断点。 I have a JNI floder where there are .c and .h files, but don't stops when I put breakpoints. 我有一个JNI floder,其中有.c和.h文件,但是当我放置断点时不要停止。 Eclipse log recognizes breakpoints, but prints error. Eclipse日志识别断点,但打印错误。

break-insert com_example_pruebaffmpeg_MainActivity.c:4323 error, msg="No symbol table is loaded. Use the \\"file\\" command." break-insert com_example_pruebaffmpeg_MainActivity.c:4323 error,msg =“没有加载符号表。使用\\”file \\“命令。”

Have you tried uninstalling Sequoyah and just using the ADT? 您是否尝试卸载Sequoyah并仅使用ADT? As of version 20, the Eclipse ADT plugin can debug NDK projects more easily and reliably than the old Sequoyah way of doing things. 从版本20开始, Eclipse ADT插件可以比旧的Sequoyah工作方式更容易,更可靠地调试NDK项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM