Duplicate but different files

Asked

Viewed 146 times

2

Well, there is an error in my application by Android Studio. And the problem is, the interface says that there are two files that are duplicated, but they are apparently different. I also tried to delete them, however, when deleting File1, dependency errors appear in the program. When deleting File2, it returns when compiling the program. Someone can help me?

Erro

Error:Execution failed for task ':app:transformResourcesWithMergeJavasForDebug'. > com.android.build.api.Transform.Transformexception: com.android.Builder.packaging.Duplicatefileexception: Duplicate files copied in APK org/apache/http/version.properties

File1: C:\Users\xxx.gradle\caches\modules-2\files-2.1\org.jbundle.util.osgi.wrap‌​ped\org.jbundle.util.osgi.wrapped.org.apache.http.client\4.1.2\98c86e42679fe7ac06‌​6f6c242e0d14f0bce0bb7c\org.jbundle.util.osgi.wrapped.org.apache.http.client-4. 1.2 . jar

File2: C: Users xxx.Gradle caches modules-2 files-2.1 org.apache.httpcomponents httpcore 4.4.5 e7501a1b34325abb00d17dde96150604a0658b54 httpcore-4.4.5.jar

  • 1

    Yes really look different, this error happens when compiling your project in Android Studio?

  • This only appears when compiling.

  • 1

    I could fix it. Instead of trying to delete . File2 jar, I just took it from the library dependencies and it stopped reappearing when compiling, not duplicating anything(even if different) hehe. Thank you for your attention.

  • 2

    @Jerrymoon would be interesting to post this as an answer then. You can even accept your answer, anything see the [tour].

1 answer

2

To solve the problem it was enough to just take the . jar from the dependencies that my program was not using and worked. Thank you all again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.