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.
出现此问题,可能是因为升级android studio或者把别人的项目提高gradle、或者第三方依赖不适合你项目的gradle导致的,此时需要配置下app级别的 build.gradle文件里的defaultConfig 添加javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
android { compileSdkVersion 26 buildToolsVersion "26.0.0" defaultConfig { xxxxx xxxxx xxxxx javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } }
}
再try again就好了