不能设置可调试标志在AndroidManifest.xml中 [英] Can not set debuggable flag in AndroidManifest.xml
问题描述
我尽量做到本教程了解调试NDK的应用程序,但是当我设置机器人:可调试=真正的
在AndroidManifest.xml文件中出现以下错误:
I try to accomplish this tutorial to learn debugging NDK apps, but when I set android:debuggable="true"
in AndroidManifest.xml file the following error occurs:
避免硬编码调试模式;离开它允许调试和 发布版本自动分配一个
Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one
如何解决它能够调试紫砂壶的应用程序?
How to solve it to be able to debug Teapot app?
推荐答案
见 SDK工具的官方文档< /一>,修订8(2010年12月)
See official doc for SDK Tools, Revision 8 (December 2010)
支持真正的调试版本。开发人员不再需要添加
的android:可调试
属性添加到&lt;应用&gt;在清单
标签
- 构建工具会自动添加属性。在的Eclipse / ADT ,所有
增量构建被认为是调试版本,所以工具插入
机器人:可调试=真正的
。当导出一个签名的发布版本中,
工具不会增加属性。在蚂蚁,蚂蚁一调试命令
自动插入机器人:可调试=真正的
属性,而
蚂蚁版本不。如果机器人:可调试=真正的
手动设置,
那么蚂蚁释放将实际做调试版本,而不是发行
构建。
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 insertandroid:debuggable="true"
. When exporting a signed release build, the tools do not add the attribute. In Ant, a ant debug command automatically inserts theandroid:debuggable="true"
attribute, while ant release does not. Ifandroid:debuggable="true"
is manually set, then ant release will actually do a debug build, rather than a release build.
更新
如果你真的想禁用检查调试的标志,在Eclipse中,你下一步应该做的:
If you really want to disable checking for debuggable flag in Eclipse you should do next:
- 转到项目preferences :
- 选择 Android的皮棉preferences
- 找到的硬codedDebugMode 标识在安全部分,然后选择它
- 更改严重性为警告作为例子。 价值
- 应用和确定
- Go to the Project Preferences:
- Select Android Lint Preferences
- Find HardcodedDebugMode Id in Security section and select it
- Change the value of Severity to Warning for example.
- Apply and Ok.
屏幕的详细信息:的
Screen for details:
这篇关于不能设置可调试标志在AndroidManifest.xml中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!