android - Gradle dagger lint: ignore by package -
I have created an Android project using Gradlle I have added a Dagger library
Dependence {compile 'com.squareup.dagger: dagger-compiler: 1.2.1' compile 'com.squareup.dagger: dagger: 1.2.1'} Try to compile the project After I received a build failure due to lint exceptions:
Invalid package: package is not included in Android
../../../ .. /../../. Gradle / cache / module-2 / files -2.1 / com.squareup.dagger / knife-compiler / 1.2.1 / c8bf6c2fda9b27f4d44a2aa4280df525a1408771 / dagger-compiler-1.2.1 .Jere: illegal package references in the library; Not included in Android: javax.annotation.processing Referenced from Dagger.internal.codegen.GraphAnalysisErrorHandler ../../../../../../.gradle/caches/modules-2/files-2.1/ Com.squareup.dagger / dagger-compiler / 1.2.1 / c8bf6c2fda9b27f4d44a2aa4280df525a1408771 / dagger-compiler -1.2.1.jar: illegal package references in the library; Not included in Android: javax.lang.model.type Referenced from Dagger.internal.codegen.GeneratorKeys. ../../../../../../.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.2.1/c8bf6c2fda9b27f4d44a2aa4280df525a1408771/dagger-compiler -1.2.1.jar: Invalid package reference in library; Not included in Android: javax.lang.model.util Referenced from Dagger.internal.codegen.GraphAnalysisErrorHandler ../../../../../../.gradle/caches/modules-2/files -2.1 / com.squareup / javawriter / 2.3.0 / 4b290e394ea3109be5c0b7f08ff75de089125122 / javawriter-2.3.0.jar: Invalid Package Reference in Library; Not included in Android: javax.lang.model.element Referenced by Com.squareup.javawriter.JavaWriter.
So, I must either fix or ignore the inaccessible packages. I've setup lint.xml but there is no way to ignore me:
& lt; Issue ID = "invalid package" & gt; & Lt; Undiscovered ... The underlying request for the Ignore George package ... / & gt; & Lt; / Issue & gt; Thanks.
found the answer here:
to add to build.gradle in the Android section , LintOptions solved this problem for me:
android {... lintOptions {Disabled 'invalid package'}} in lint.xml Did not work for me to add a single unseen statement.
Comments
Post a Comment