Gradle dagger lint: ignore by package

后端 未结 2 1071
别跟我提以往
别跟我提以往 2021-02-12 22:54

I\'ve created an Android project using Gradle. I\'ve added a Dagger library:

dependencies {
    compile \'com.squareup.dagger:dagger-compiler:1.2.1\'
    compile         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-12 23:34

    Found the answer here: https://android.googlesource.com/platform/tools/base/+/e6a5b9c7c1bca4da402de442315b5ff1ada819c7

    adding in build.gradle in android section, lintOptions solved the issue for me:

    android {
    ...
    
       lintOptions {
           disable 'InvalidPackage'
       }
    }
    

    adding the same ignore statement in lint.xml did not worked for me.

提交回复
热议问题