且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android Lint:如何抑制与支持库相关联的所有警告?

更新时间:2022-10-19 10:07:56

您可以在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