Android Studio3.0报错:Annotation processors must be explicitly declared now
16lz
2021-01-23
偶尔在GitHub上搞点代码瞅瞅,AS升级3.0之后带入经常吃点这样那样的错误:
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 (com.jakewharton:butterknife:7.0.1)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 {
...
//添加如下配置
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
}
}
更多相关文章
- Android消息机制 空闲消息处理器
- Android中子线程网络查看器与Handler消息处理器
- Android 的res/values/colors自定义颜色列表和注释表及布局文件
- Android 总结:打造Android中的流式布局和热门标签(源码有详细注释)
- IllegalStateException,PatternSyntaxException,Android studio 注
- Android studio中新建类时自动生成注释的设置
- Android系统配置数据库注释(settings.db)
- 参考注释郭霖老师的Android相机程序
- Android 初学入门代码注释 学习笔记001 16.03.18