Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]

I have following dependency and getting CoordinatorLayout$Behavior duplicate entry. I have searched so more but did not find any solution.

I am getting

Caused by: java.io.IOException: Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]
at proguard.io.JarWriter.getOutputStream(JarWriter.java:138)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:92)
at proguard.io.ClassRewriter.read(ClassRewriter.java:68)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.JarReader.read(JarReader.java:65)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:184)
... 50 more

where core UI comes in? I think this makes issues. Can anyone know where i need to exclude one of this lib?

I have explore my all lib and having following scene.

enter image description here

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//    compile('com.mikepenz:materialdrawer:5.8.0@aar') {
//        transitive = true
//    }
compile 'com.android.support:multidex:1.0.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:support-v4:27.0.0'
compile 'com.android.support:recyclerview-v7:27.0.0'
compile 'com.android.support:design:27.0.0'
compile 'com.android.support:cardview-v7:27.0.0'
compile 'com.google.android.gms:play-services-gcm:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.github.rey5137:material:1.2.4'
compile 'org.apache.commons:commons-lang3:3.6'
compile 'com.afollestad.material-dialogs:core:0.9.5.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
compile 'com.github.travijuu:numberpicker:1.0.7'
compile 'com.github.carlosmuvi:SegmentedProgressBar:0.6.0'
compile 'com.nex3z:notification-badge:0.3.0'
compile 'com.bogdwellers:pinchtozoom:0.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile files('libs/PGSDK_V2.1.jar')
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.race604.waveloading:library:1.1.1'
compile 'com.karumi:dexter:4.2.0'
compile 'com.msg91.sendotp.library:library:3.1'
}
like image 361
Bhavesh Hirpara Avatar asked Mar 01 '18 07:03

Bhavesh Hirpara


1 Answers

I just did it like. It's working now

Solution 1

compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.android.support:design:27.1.0'
compile 'com.android.support:cardview-v7:27.1.0'

Solution 2 (NEW)

Migrate your code to AndroidX

enter image description here

like image 69
Bhavesh Hirpara Avatar answered Sep 23 '22 21:09

Bhavesh Hirpara