S
S
Sergey2016-10-11 08:05:31
Java
Sergey, 2016-10-11 08:05:31

How to cure java.util.zip.ZipException: duplicate entry: org/jetbrains/annotations/NotNull.class?

I added Kotlin support to the existing project in order to continue using it, but there was a problem when generating the APK, although the project itself starts in debugging.
Generate APK error occurs:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/jetbrains/annotations/NotNull.class

Duplicate classes after adding Kotlin.
Tried different options, like like: here or like here , but doesn't help. I encountered this error for the first time. Maybe someone has a solution?
build.gradle, just in case, on the link: https://gist.github.com/sergrnz/bceed32f08b8786216...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tiberal, 2016-10-11
@Tiberal

./gradlew dependencies
in the resulting graph look for duplicate dependencies and exclude them.
It even says that jetbrains annotations are duplicated. It remains only to find in any

E
Eugene, 2016-10-11
@zolt85

Have you tried rebuilding with clean?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question