如何在Android上使用NDK-GDB调试可执行精灵,而无需AndroidManifest.xml?

发布于 2025-01-20 19:42:54 字数 514 浏览 1 评论 0原文

我使用了cmake & ndk 在 hello.cpp 下构建并在 android 上运行。

#include <stdio.h>

int main() {
    printf("Hello World!\n");
    return 0;
}

遵循 gdb 指令。在 Android 设备上运行 gdbserver :1234 hello。 在 macOS 上运行 $NDK/ndk-gdb 时遇到错误消息 ERROR: Could not find AndroidManifest.xml in currentdirectory or aparentdirectory.从项目内部启动此脚本,或使用 --project=.

如何在 Android 平台上调试没有 AndroidManifest.xml 的原生 C++ 项目?

I used cmake & ndk build below hello.cpp and run it on android.

#include <stdio.h>

int main() {
    printf("Hello World!\n");
    return 0;
}

Follow the gdb instruction. run gdbserver :1234 hello on android device.
When run $NDK/ndk-gdb on macOS encounter error msg ERROR: Could not find AndroidManifest.xml in current directory or a parent directory. Launch this script from inside a project, or use --project=<path>.

How to debug native c++ project without AndroidManifest.xml on android platform?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文