How to configure the lint.xml file

suggest change

You can specify your Lint checking preferences in the lint.xml file. If you are creating this file manually, place it in the root directory of your Android project. If you are configuring Lint preferences in Android Studio, the lint.xml file is automatically created and added to your Android project for you.


<?xml version="1.0" encoding="UTF-8"?>
        <!-- list of issues to configure -->

By setting the severity attribute value in the tag, you can disable Lint checking for an issue or change the severity level for an issue.

The following example shows the contents of a lint.xml file.

<?xml version="1.0" encoding="UTF-8"?>
    <!-- Disable the given check in this project -->
    <issue id="IconMissingDensityFolder" severity="ignore" />

    <!-- Ignore the ObsoleteLayoutParam issue in the specified files -->
    <issue id="ObsoleteLayoutParam">
        <ignore path="res/layout/activation.xml" />
        <ignore path="res/layout-xlarge/activation.xml" />

    <!-- Ignore the UselessLeaf issue in the specified file -->
    <issue id="UselessLeaf">
        <ignore path="res/layout/main.xml" />

    <!-- Change the severity of hardcoded strings to "error" -->
    <issue id="HardcodedText" severity="error" />

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents