Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

java - Annotation processors must be explicitly declared now

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.

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

question from:https://stackoverflow.com/questions/46963498/annotation-processors-must-be-explicitly-declared-now

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...