Error:Execution failed for task \':laMusique2May2016:javaPreCompileRelease\'.
> Annotation processors must be explicitly declared now. The following dependencies on
Even i had the same problem and finally i solved my problem by adding this to app level gradle file
android{
....
defaultConfig{
....
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
buildTypes {
...
}
hope its solved someone's problem
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.
Adding annotationProcessor dependencies not work for me, instead I drop this line inside build.gradle at arbitrary places works:
android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
Annotation processors can be declared with annotationProcessor instead of implementation/compile like we used to declare earlier.
implementation 'com.google.auto.value:auto-value:1.1'
compile 'com.google.auto.value:auto-value:1.1'
Should be replaced with
annotationProcessor 'com.google.auto.value:auto-value:1.1'
For me, this issue happened because jitpack wasn't placed as the last entry in root grade.
allprojects {
repositories {
// ... other repositories
maven { url "https://jitpack.io" }
}
}
The solution was taken from @hotchemi comment in https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/535#issuecomment-432190926