0

I have a build.gradle file for an android project.It says

android {
lintOptions {      
   quiet false
   abortOnError true
   ignoreWarnings true
   }
   ...
}

My requirement is like it should get aborted only if there are errors. If warnings are present just continue with the build.How can we do that?

Also I tried running the lint from command line as

lint path-to-project

This gives an error To correctly analyze Gradle projects, you should run "gradlew :lint" instead. Please help me to resolve this also.

Nevin Raj Victor
  • 2,924
  • 3
  • 23
  • 37

1 Answers1

2

try adding checkReleaseBuilds inside lintoptions

Like this

lintOptions {
    checkReleaseBuilds false
}

Second issue can be resolved using following commands

cd PATH_TO_PROJECT
chmod a+x gradlew
./gradlew lint

This will work.

Nevin Raj Victor
  • 2,924
  • 3
  • 23
  • 37
Deniz
  • 12,332
  • 10
  • 44
  • 62