AndroidStudio:Annotation processors must be explicitly declared now.【已解决】

Time:2019年5月27日
Android Studio:3.4.1

文章目录

    • 问题
    • 解决

问题

在导入lombok依赖时,遇到以下问题:

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.
- lombok-1.18.8.jar (org.projectlombok:lombok:1.18.8)
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.

在这里插入图片描述

解决

如果添加了注释编译器,需在dependencies中增加annotationProcessor 依赖内容
新增内容如图:
AndroidStudio:Annotation processors must be explicitly declared now.【已解决】_第1张图片
谷歌描述:
AndroidStudio:Annotation processors must be explicitly declared now.【已解决】_第2张图片

你可能感兴趣的:(Android)