0

I'm trying to build my project with gradle, but I get this error message:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/ftpserver/ftplet/Authentication.class

So, I think the Authentication.class file is present in more than just ftp library, but I don't know how to fiw this error.

My gradle.build dependencies:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'
    compile 'org.apache.ftpserver:ftpserver-core:1.0.6'
    compile 'cc.mvdan.accesspoint:library:0.2.0'
}

How to fix it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sylvain GIROD
  • 836
  • 1
  • 11
  • 23
  • 1
    Do u have any jars in lib folder? – Raghavendra May 03 '16 at 15:35
  • You could open the Gradle window on the right-side of Android Studio and run `help` > `dependencies`. Otherwise, more options are discussed in [my post here](http://stackoverflow.com/questions/36698816/gradle-what-is-a-non-zero-exit-value-and-how-do-i-fix-it) – OneCricketeer May 03 '16 at 16:03

1 Answers1

1

The problem came from the ftpserver-core dependence. I had to exclude the ftplet-api module from ftpserver-core dependence in gradle, because fplet-api is added two times.

Sylvain GIROD
  • 836
  • 1
  • 11
  • 23
  • How did you exclude the module? Can you give an example gradle snippet? – Zdravko Donev Nov 22 '18 at 20:09
  • @ZdravkoDonev I quit the company 2 years ago, so I won't be able to bring the right snippet, sorry. You may find help here : https://docs.gradle.org/current/userguide/managing_transitive_dependencies.html#example_excluding_transitive_dependency_for_a_particular_dependency_declaration – Sylvain GIROD Nov 23 '18 at 10:04