avoid lint when gradle execute check

Set checkReleaseBuilds to false will disable lint check on release build. Add following scripts to your build.gradle file:

lintOptions {
     /**
     * Set whether lint should check for fatal errors during release builds. Default is true.
     * If issues with severity "fatal" are found, the release build is aborted.
     */
    checkReleaseBuilds false
}

I just disabled the task during project setup:

android {
    lintOptions {
        tasks.lint.enabled = false
    }
}

Note: it's not necessary to put the statement inside android.lintOptions, but since it's configuring lint, it's nice to have them together.


gradle build -x lint 

Source: Gradle User Guide : Excluding Tasks


You can skip it using adding -x lint when you run the check task:

./gradlew check -x lint 

If you want to skip it permanently you can add this to your build.gradle before apply plugin: 'com.android.application':

tasks.whenTaskAdded { task ->
    if (task.name.equals("lint")) {
        task.enabled = false
    }
}