Run lint when building android studio projects

前端 未结 7 724
予麋鹿
予麋鹿 2020-11-28 07:12

I would like to be able to run the lint task when I\'m building projects with the android studio to ensure the lint rules are being followed.

I have tried using task

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 07:53

    To runt lint and analyze your project, simply select Analyze > Inspect Code.

    You should get a nice window with all issues.

    enter image description here

    Also check Run lint in Android Studio for more information.


    I did a little more research, try adding this to your build.gradle.

    lintOptions {
          abortOnError true
      } 
    

    There are many options that you can apply to the build.gradle

提交回复
热议问题