我正在使用Windows和Eclipse 3.7 Classic与Android开发的ADT插件。Eclipse + FindBugs - 排除过滤器文件不起作用
我刚刚安装了FindBugs,它在自动生成的R.java类中发现了一个错误。
我想从FindBugs检查中排除这个类。
我发现我可以定义排除过滤器在XML文件中的FindBugs,所以我创建了一个文件d:\项目\日食\ FindBugsExculde.xml文本
<FindBugsFilter>
<Match>
<Class name="com.android.demo.notepad3.R$attr" />
</Match>
</FindBugsFilter>
我添加这个文件到“排除过滤文件”部分附近的Eclipse - >窗口 - >首选项 - > Java - > FindBugs - >过滤文件 - >“添加...”按钮。
但是,当我在我的项目上单击右键,选择“查找错误” - >“查找错误”我仍然看到错误
The class name com.android.demo.notepad3.R$attr doesn't start with an upper case letter
我甚至试图取代
<Class name="com.android.demo.notepad3.R$attr" />
与
<Class name="~.*" />
但仍然存在错误。
我试图重新启动Eclipse - 没有运气。我甚至想,也许存在的FindBugs所以它不使用规定,但Procmon.exe从SysinternalsSuite表明,每次做我执行FindBugs的时候使用它的文件中的错误:
ProcessName Operation Path Result
javaw.exe QueryOpen D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe QueryOpen D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CreateFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CreateFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe QueryFileInternalInformationFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CloseFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe ReadFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
javaw.exe CloseFile D:\Projects\eclipse\FindBugsExculde.xml SUCCESS
我在做什么错?请帮帮我!
不幸的是,这不是这种情况:(我试图删除它们,因为你建议,但他们再次上升下次我运行“查找错误”。我也尝试清除该项目 - 错误消失 - 但如果我运行“查找错误” - 它们会出现。 – Kluyg