Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.
导入项目时,发现之前项目的butter knife报错,用到注解的应该都会报错
error:execution failed for task ':app:javaprecompiledebug'.
> 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.
- butterknife-7.0.1.jar
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.
在app的build中
android {
...
defaultconfig {
...
//添加如下配置就ok了
javacompileoptions { annotationprocessoroptions { includecompileclasspath = true } }
}
...
}
上一篇: jdk与tomcat的环境配置
下一篇: 还活着
推荐阅读
-
Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.
-
AndroidStudio3.0中出现Annotation processors must be explicitly declared now.的错误
-
Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.
-
AndroidStudio3.0中出现Annotation processors must be explicitly declared now.的错误