0

I have received this Error in a sudden, and I try clean and rebuild the project it doesn't work at all. I pretty sure that I didn't change anything in the app/build.gradle file. I just change the layout of a few files, and it ends up with this error

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.gorillachat.gorillachat"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-auth:11.0.4'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.google.firebase:firebase-database:11.0.4'
    implementation 'com.google.firebase:firebase-storage:11.0.4'
    implementation 'com.firebaseui:firebase-ui-database:2.3.0'
    implementation 'com.google.firebase:firebase-messaging:11.0.4'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'id.zelory:compressor:2.1.0'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

}

apply plugin: 'com.google.gms.google-services'

Error after Clean build and rebuild

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. java.io.IOException: Can't write [/home/zzz/AndroidStudioProjects/GorillaChat/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/home/zzz/.gradle/caches/transforms-1/files-1.1/support-core-ui-27.1.0.aar/e7e0f4a17f7b0340baac46b45e4bb4b9/jars/classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))

zisean
  • 1
  • 2
  • Examine your Gradle console. There should be more details in there of exactly what went wrong. This is just the end message. See [this question](https://stackoverflow.com/q/48990598/115145) for an example. – CommonsWare Feb 28 '18 at 16:39
  • 1
    Possible duplicate of [Unable to merge dex](https://stackoverflow.com/questions/46267621/unable-to-merge-dex) – shadowsheep Feb 28 '18 at 16:42
  • 1
    @shadowsheep ya, after I did a clean build and rebuild it showed the error of Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > java.io.IOException: Can't write [/home/zzz/AndroidStudioProjects/GorillaChat/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/home/zzz/.gradle/caches/transforms-1/files-1.1/support-core-ui-27.1.0.aar/e7e0f4a17f7b0340baac46b45e4bb4b9/jars/classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class])) – zisean Feb 28 '18 at 17:51
  • same issue here @zisean – fritz-playmaker Mar 03 '18 at 19:31

0 Answers0