亲测解决:The following dependencies on the compile classpath are found to contain annotation processor.

完整的错误信息是:

Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
  - arouter-compiler-1.1.4.jar (com.alibaba:arouter-compiler:1.1.4)
  - auto-service-1.0-rc2.jar (com.google.auto.service:auto-service:1.0-rc2)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

项目中,我用config.gradle统一系统配置信息和第三方库,如下图:

亲测解决:The following dependencies on the compile classpath are found to contain annotation processor._第1张图片 

在使用的build.gradle中:

api rootProject.ext.dependencies.arouter_compiler

解决方法(用错了引用方式):

  annotationProcessor rootProject.ext.dependencies.arouter_compiler

 

 

你可能感兴趣的:(Bug填坑笔记)