当前位置: 移动技术网 > IT编程>移动开发>Android > Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.

Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.

2018年12月13日  | 移动技术网IT编程  | 我要评论

乐昌会计继续教育,悬崖上的金鱼姬国语版,就让我多爱你一天

导入项目时,发现之前项目的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 } }
}
...
}

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网