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 依赖内容
。
新增内容如图:
谷歌描述: