【问题标题】:Not able to debug Native Application in eclipse无法在 Eclipse 中调试本机应用程序
【发布时间】:2015-01-26 17:40:05
【问题描述】:

我正在尝试在 Android 中学习本机应用程序开发,为此我创建了一个示例应用程序,现在我正在尝试调试它。我按照这个page 的教程进行调试。但是现在当我开始使用此配置进行调试时,我收到以下错误:

Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run.  Try "help target".
Don't know how to run.  Try "help target".

我的开发环境(如果需要):

  GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
  Eclipse - the eclipse ADT bundle downloaded from the android developers website
  ADT package version 23.0.1.1259578
  Eclipse CDT - Eclipse c/c++ Development Tools - 8.1.2.201302132326
  Eclipse CDT - GDB Common - 7.0.0.201302132326
  NDK - android-ndk-r10c-linux-x86_64

任何帮助表示赞赏。

【问题讨论】:

标签: android eclipse debugging android-ndk eclipse-cdt


【解决方案1】:

像这样使用可调试权限:

 <application

       android:debuggable="true"
        >

希望对你有帮助。

【讨论】:

  • 你不能这样做,因为当你这样做时它会给出一个错误提示:Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one
  • 哦,真的。你有没有在manifest中找到应用程序标签,如果找到,然后将这一行粘贴进去,否则离开解决方案。但不要说你不能这样做。已经测试过的解决方案。
  • 好吧,我也试过了,但我无法添加它。并且 AFIK 在开发过程中 debuggable 属性默认设置为 true。
  • debuggable 属性需要手动设置为 true 才能自动更改 ndk 构建选项。您可以从 Eclipse 中停用特定的 lint 检查:stackoverflow.com/questions/23986724/…
【解决方案2】:

通过此命令启用调试 ndk-build NDK_DEBUG=1 APP_OPTIM=调试。 android.mk 文件不允许硬编码。

【讨论】:

    【解决方案3】:

    我能够按照answer to this question 调试代码。我没有发布我遵循的步骤,因为我不想重复答案。如果有人按照提供的链接中给出的答案遇到问题,我将非常乐意提供帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-09
      • 2016-09-11
      • 2015-01-06
      • 2015-09-29
      • 2018-10-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-04
      相关资源
      最近更新 更多