# Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/common/collect/ImmutableList.class

- **ID:** `android/gradle-task-assemble-debug-failed-jetifier`
- **Domain:** android
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Duplicate class found in multiple dependencies, often due to Jetifier converting both support libraries and AndroidX, or two libraries shipping the same class.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Android Gradle Plugin 8.1 | active | — | — |
| Gradle 8.2 | active | — | — |
| Jetifier 1.0.0-beta10 | active | — | — |
| Android Studio Hedgehog 2023.1.1 | active | — | — |

## Workarounds

1. **Run `./gradlew :app:dependencies --configuration debugCompileClasspath` to identify which libraries bring the duplicate class. Then exclude the transitive dependency in build.gradle: implementation('com.example:library:1.0') { exclude group: 'com.google.guava', module: 'guava' }** (85% success)
   ```
   Run `./gradlew :app:dependencies --configuration debugCompileClasspath` to identify which libraries bring the duplicate class. Then exclude the transitive dependency in build.gradle: implementation('com.example:library:1.0') { exclude group: 'com.google.guava', module: 'guava' }
   ```
2. **Upgrade all dependencies to their AndroidX versions and disable Jetifier in gradle.properties: android.jetifier.enabled=false** (80% success)
   ```
   Upgrade all dependencies to their AndroidX versions and disable Jetifier in gradle.properties: android.jetifier.enabled=false
   ```
3. **Use the `com.google.guava:guava:30.1.1-android` variant which avoids conflicts with other Android libraries.** (75% success)
   ```
   Use the `com.google.guava:guava:30.1.1-android` variant which avoids conflicts with other Android libraries.
   ```

## Dead Ends

- **** — Disabling Jetifier entirely may cause other libraries to break if they still depend on support libraries. (70% fail)
- **** — Adding an exclude statement in packagingOptions for the duplicate class often masks the root cause and may remove needed functionality. (65% fail)
- **** — Using a newer version of the dependency without checking its transitive dependencies may introduce more duplicates. (60% fail)
