How to re-enable a disabled Android Lint warning on file level

纵然是瞬间 提交于 2020-01-14 07:34:09

问题


I disabled the Android Lint warning 'HardcodedText' for a specific XML file (it's for a numeric key pad with fix text for the digits).

I can't find a way to re-enable it on this file ('Restore Defaults' or so), neither in Windows > Preferences > Android > Lint Error Checking nor in Project > Properties > Android Lint Preferences.

Any idea on how to re-enable a disabled warning on file level?


回答1:


Found it out myself: Lint puts the file "lint.xml" to the project with the dependant items.

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

Unfortunatelly, editing and saving this file is not enough. You have to close and re-open the project or even Eclipse.

HTH others with the same issue....




回答2:


If you have only one file and you need to re-enable lint warning go to Windows -> Preferences -> Android -> Lint Error Checking -> Restore Defaults



来源:https://stackoverflow.com/questions/10069936/how-to-re-enable-a-disabled-android-lint-warning-on-file-level

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!