3
votes

Updating AndroidStudio this week I was forced to add AnnotationProcessor:

(Don't even understand what for.)

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. kotlin-compiler-embeddable-1.3.11.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.11)

So I added to my app.build.gradle:

dependencies {
...
annotationProcessor "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
...
}

But now I can't get rid of the following errors:

Run tasks :app:checkDebugDuplicateClasses
> Duplicate class found in  modules annotations-13.0.jar (org.jetbrains:annotations:13.0) and kotlin-compiler-embeddable-1.3.11.jar   (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.11)

I don't know where org.jetbrains:annotations:13.0 is declared/imported in my gradles or settings.

How can I solve this error?

2

2 Answers

0
votes

I was getting a similar Gradle error stating duplicate class found in annotations when I tried to use kotlin in some Old project. In my case, I have to remove the following dependency which was causing conflict with kotlin's annotation module.

implementation 'org.jetbrains:annotations-java5:17.0.0'
-3
votes
./gradlew app:dependencies

check all dependencies