ArthurHub / Android-Image-Cropper

Image Cropping Library for Android, optimized for Camera / Gallery.
Apache License 2.0
6.39k stars 1.36k forks source link

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex #541

Open anuragsunmugam opened 6 years ago

anuragsunmugam commented 6 years ago

getting unable to merge dex error on build after adding compile 'com.theartofdev.edmodo:android-image-cropper:2.7.+'

when i remove this entry from gradle then everything is fine. current dependencies:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v4:26.1.0'
    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'
    implementation 'com.android.support:design:26.1.0'

    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.google.android.gms:play-services-maps:11.8.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
    implementation 'de.hdodenhof:circleimageview:2.2.0'

    implementation 'com.makeramen:roundedimageview:2.3.0'

    compile 'com.daimajia.easing:library:2.0@aar'
    compile 'com.daimajia.androidanimations:library:2.3@aar'

    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.3.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
    implementation 'com.google.code.gson:gson:2.7'
    implementation 'com.karumi:dexter:4.1.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
}
aemssid commented 6 years ago

Facing same issue

nvolpini commented 6 years ago

After I added this library to my project I had the same error. By changing the support library version from 27.0.2 to 27.1.1 automatically solved the problem.

Kashish-Sharma commented 6 years ago

Or you can try cleaning the project and build again.