AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependenci

1、解决办法就是
把Project的 classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’* 删除*,
同时把Module中 apply plugin: ‘com.neenbedankt.android-apt’ 的也 删除

然后把dependencies中原来使用apt的改为annotationProcessor

2、AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.


在app的build中
android {
    ...
    defaultConfig {
        ...
        //添加如下配置就OK了
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
    }

你可能感兴趣的:(android)