现在必须显式声明注释处理器 [英] Annotation processors must be explicitly declared now

查看:130
本文介绍了现在必须显式声明注释处理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Error:Execution failed for task ':laMusique2May2016:javaPreCompileRelease'.
> 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.
    - auto-value-1.1.jar (com.google.auto.value:auto-value:1.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.

我看到了这个问题,但问题是auto-value-1.1.jar不在我身上gradle文件

I am seeing this issue, but the problem is auto-value-1.1.jar is not in my gradle files

推荐答案

您应该在gradle中明确添加注释处理器。将以下内容放在gradle依赖项中应修复它:

You should explicitly add annotation processors in gradle. Putting the following in your gradle dependencies should fix it:

annotationProcessor 'com.google.auto.value:auto-value:1.1'






但是,正如其他人已经提到的那样,你应该弄清楚你现有的哪些依赖项使用自动值来断言你是否真的需要它。注释处理器最终会减慢构建时间,因此如果不必要,请不要包含它。


However, as others have already mentioned, you should probably figure out which of your existing dependencies was using auto-value to assert whether or not you really need it. Annotation processors ultimately slow down your build time so don't include it if it's unnecessary.

这篇关于现在必须显式声明注释处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆