Android Lint:如何抑制与支持库相关联的所有警告? [英] Android Lint: How to suppress all warnings associated with support library?

查看:187
本文介绍了Android Lint:如何抑制与支持库相关联的所有警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Android Lint来保持我的代码运行顺利,但是由于我使用了support-v7-appcompat,Lint会返回一个庞大的,溢出的警告列表。我如何抑制所有这些,所以我只能看到我自己的应用程序的问题?在Lint Overflow菜单中,有检查所有项目,检查android-support-v7-appcompat和检查[myapp]的选项,但点击[myapp]也显示了大量有关abc_的错误(支持库),并通过选择并按忽略该项目来抑制它们不起作用!一旦我再次点击检查[myapp],就会出现相同的棉绒错误。



我只能假设这不是羊毛的行为!



请问,

解决方案

您可以在android lint菜单中找到该选项:



选中跳过库项目依赖关系后,当您检查项目时,应该跳过appcompat lint警告


I am trying to use Android Lint to keep my code running smoothly but since I'm using support-v7-appcompat, Lint returns an enormous, overflowing list of warnings. How can I suppress all of them so I can only see issues with my own app? In the Lint Overflow menu, there are options for "Check all Projects", "check android-support-v7-appcompat", and "check [myapp]" - but clicking [myapp] also shows a vast amount of errors regarding abc_ (support library) and trying to suppress them by selecting them and pressing "ignore in this project" doesn't work! As soon as I click "check [myapp]" again, the same lint errors show up.

I can only assume this isn't intended behavior of lint! What can I do to improve this?

Regards,

解决方案

You can find the option in the android lint menu:

Once "Skip Library Project Dependencies" is checked, that should skip appcompat lint warnings when you are checking your project

这篇关于Android Lint:如何抑制与支持库相关联的所有警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆