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

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 } }
    }
    ...
}

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

时间: 2024-08-30 04:51:04

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

AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的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

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

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

WebService之CXF注解报错(一)

WebService之CXF注解 1.具体报错如下 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-5-4 22:42:12 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native li

WebService之CXF注解报错(二)

WebService之CXF注解 1.具体报错如下 五月 04, 2014 11:24:12 下午 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass 信息: Creating Service {http://service.you.com/}IServiceService from class com.you.service.IService 五月 04, 2014 11:

WebService之CXF注解报错(三)

如果你对项目管理.系统架构有兴趣,请加微信订阅号"softjg",加入这个PM.架构师的大家庭 要成为WEB架构师,首先要找到通往成功的正确方向,接下来我们就要往这个方向努力.然而如唐僧去西天取经一样,要历经种种磨难,一路上打败各种妖魔鬼怪才能继续前行,所以唐僧取经,第一件事,就是招徒弟,遇见妖魔鬼怪就让技术高超的徒弟打败它,徒弟不听话就念紧箍咒,徒弟也搞不定的妖怪,就请观音菩萨搞定,这就是唐僧成功的法宝,没法宝上路,看来我们会死的比较惨啊,哈哈. 我们在通往架构师的路上,同样会遇到各

myeclipse 从svn检出项目后会出现 所有的spring注解报错的问题

myeclipse  从svn检出项目后会出现 所有的spring注解报错的问题  即使更换项目jdk 都不好使. 解决方法如下: 1. 刚检出的项目有可能是 jdk 1.5 一下版本编译的.你只需要切换  编译版本就OK了. 2. 步骤如下: (1)点击项目右键-->选择properties (2)从弹出的窗口中选择 java compiler-->然后选择 适合自己的 jdk 版本就可以了.选择完 apply 一下  选择 yes. 原文地址:https://www.cnblogs.com

在接口的实现类里使用@Override注解报错

问题分析 @Override注解用来检测子类对父类或接口的方法的重写是否正确,但有一次我在Eclipse里对接口的实现类里使用@Override注解却报错,不过在父类的子类里使用该注解却是正常的. 百度了下才知道原来这是jdk1.5时的一个bug,在1.6时已经被修复:那么问题来了,我使用的jdk是1.8,为什么会报这个错误?明明之前也在接口的实现类里用过该注解,却没问题.由于Eclipse经常抽风,我怀疑是Eclipse的问题,经过排查确实如此,该项目使用的jdk版本不知道为什么变成了jdk1

spring aop 注解报错

error at ::0 can't find referenced pointcut insertServiceCall 这很有可能是因为aop的包与jdk的版本不对应,经过修改jdk为1.7 加导入1.7的aop包之后,问题已经解决. 百度云下载地址: aspectjrt-1.7.4.jar aspectjweaver-1.7.4.jar

在 IDEA 中使用 @Test 注解报错的问题

原因一:JUnit 版本太低 解决:导入 4.12 及其以上版本 原因二:没有将 test 文件夹 设置为 Test Resource Root 解决:右键文件夹 --> Mark Directory as --> Test Resource Root 来源:https://blog.csdn.net/qq_42322548/article/details/91416495?utm_source=distribute.pc_relevant.none-task 原文地址:https://www