Android Lint Warnings Using tools:ignore in xml files

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


The attribute tools:ignore can be used in xml files to dismiss lint warnings.

BUT dismissing lint warnings with this technique is most of the time the wrong way to proceed.

A lint warning must be understood and fixed... it can be ignored if and only if you have a full understanding of it's meaning and a strong reason to ignore it.

Here is a use case where it legitimate to ignore a lint warning:

  • You are developing a system-app (signed with the device manufacturer key)
  • Your app need to change the device date (or any other protected action)

Then you can do this in your manifest : (i.e. requesting the protected permission and ignoring the lint warning because you know that in your case the permission will be granted)

<manifest xmlns:android=""
    <uses-permission android:name="android.permission.SET_TIME"

Got any Android Question?