Error:java.lang.RuntimeException: 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.
这个问题是注解适配问题,新的 gradle 插件不再支持 annotation processors,如果需要使用需要显式声明:
defaultConfig{
...
versionCode 1
versionName 1.0
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
如果项目里面有用到Butterknife,includeCompileClasspath的值要设置true注解才生效。