gpt4 book ai didi

android - 无法在 AndroidManifest.xml 中设置可调试标志

转载 作者:IT老高 更新时间:2023-10-28 23:30:25 29 4
gpt4 key购买 nike

我尝试完成this tutorial学习调试 NDK 应用程序,但是当我在 AndroidManifest.xml 文件中设置 android:debuggable="true" 时出现以下错误:

Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one

如何解决才能调试茶壶app?

最佳答案

查看官方文档 SDK Tools , 修订版 8(2010 年 12 月)

Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the <application> tag in the manifest — the build tools add the attribute automatically. In Eclipse/ADT, all incremental builds are assumed to be debug builds, so the tools insert android:debuggable="true". When exporting a signed release build, the tools do not add the attribute. In Ant, a ant debug command automatically inserts the android:debuggable="true" attribute, while ant release does not. If android:debuggable="true" is manually set, then ant release will actually do a debug build, rather than a release build.

更新

如果您真的想在 Eclipse 中禁用检查可调试标志,您应该执行以下操作:

  1. 转到项目首选项:
  2. 选择 Android Lint 首选项
  3. Security 部分找到 HardcodedDebugMode Id 并选择它
  4. 例如将 Severity 的值更改为 Warning
  5. 应用确定

屏幕详情: enter image description here

关于android - 无法在 AndroidManifest.xml 中设置可调试标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23986724/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com