码迷,mamicode.com
首页 > Windows程序 > 详细

AS使用lombok注解报错:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

时间:2018-05-08 16:23:22      阅读:633      评论:0      收藏:0      [点我收藏+]

标签:添加   jar   .com   报错信息   following   app   ror   xpl   sso   

Rebuild时报错信息如下所示:

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

 

AS使用lombok注解报错:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

标签:添加   jar   .com   报错信息   following   app   ror   xpl   sso   

原文地址:https://www.cnblogs.com/jeffen/p/9008415.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!