8

我为特定的 XML 文件禁用了 Android Lint 警告“HardcodedText”(它适用于带有数字修复文本的数字键盘)。

在Windows > Preferences > Android > Lint Error CheckingProject > Properties > Android Lint Preferences中,我都找不到在此文件上重新启用它的方法(“恢复默认值”左右)。

关于如何在文件级别重新启用禁用警告的任何想法?

4

2 回答 2

13

我自己发现了:Lint 将文件“lint.xml”与依赖项一起放入项目中。

<lint>
  <issue id="UnusedResources">
    <ignore path="res\layout\my_layout.xml" />
  </issue>
<lint>

不幸的是,编辑和保存这个文件是不够的。您必须关闭并重新打开项目甚至 Eclipse。

HTH 其他人有同样的问题....

于 2012-05-03T15:35:10.820 回答
1

如果您只有一个文件并且需要重新启用 lint 警告,请转到 Windows -> Preferences -> Android -> Lint Error Checking -> Restore Defaults

于 2014-08-08T04:19:56.007 回答