I'm having this error when integrating Adobe Creative SDK. The problem seems to come from Localytics library inside the Creative SDK.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/localytics/android/BuildConfig.class
This seems to happen because we are also using Localytics in our project but I found out that the one in the Creative SDK is older version (Ver. 2) than the one in our project (Ver. 4)
You can use this command at the Android Studio Terminal:
1
./gradlew :app:dependencies
2
./gradlew clean (Android ---> Clean the Project)
3
./gradlew clean assembleDebug | ./gradlew clean:assembleDebug
Let me know if this works! I fixed my project or if you need something more clear.
Related
I am implementing facebook native ads in unity that needs gradle build from unity. After importing to Android Studio and gradle sync it runs well but during signed APK it produces the error which is.
Error:Execution failed for task ':transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/unity3d/ads/android/BuildConfig.class
This error means you have duplicate class definition for:
com.unity3d.ads.android.BuildConfig
Try look into your jar/aar to see if the class is present at multiple places.
I like to use grep (linux/osx) or 7-Zip to quickly explores my jar/aar files
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzahl.class
In terminal execute in root project folder:
./gradlew clean
Try this!
The documentation says that.
Each version of FirebaseUI has dependency on a fixed version of these
libraries, defined as the variable firebase_version in
common/constants.gradle. If you are using any dependencies in your app
of the form compile 'com.google.firebase:firebase-:x.y.z' or compile
'com.google.android.gms:play-services-:x.y.z' you need to make sure
that you use the same version that your chosen version of FirebaseUI
requires.
Am using the following library Autobahn for web sockets usage in my Android project.
When am using the old gradle version 1.3.0, am not encountering any issues in building & running the app, whereas
when i update the gradle version to 1.5.0, am encountering the following issue.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: de/tavendo/autobahn/ByteBufferInputStream.class
I have tried the below options already
1. multiDexEnabled is set to true in gradle file.
2. gradlew clean is also done, along with clean build.
Any other suggestions to resolve this issue would be great.
Regards,
Dinesh Kumar G
Here is a interesting way to add Autoban build to gradle. Try to remove your jar and add this in your build file.
I try integrate gradle 2.0.0 plugin into my project. When i try build project by AS everything is fine. But when i try build project through console
(./gradlew build or ./gradlew assemble (before i call ./gradlew clean)) i get most popular build exception in last time
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry
Now i have last build tools.How it possible? Whats wrong?
We're already setup with Braintree, I'm having issues setting up our Android project with Braintree's Advanced Fraud Tools. We’ve followed all of the instructions here
I'm getting the following error message when we run the app after the library is imported through Gradle.
Error:Execution failed for task ':App:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: com/devicecollector/AbstractCollectorProcess.class