Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception while processing task java.io.ioexception: can't write or read

Hello I added a new dependency and I started getting the following error when I try to run the application:

Warning:Exception while processing task java.io.IOException: Can't write [/Users/paularellano/Documents/Workbench/Android/Huddle/huddle_2.0 updt/Huddle_Android/build/intermediates/transforms/proguard/release/jars/3/1f/main.jar] (Can't read [/Users/paularellano/.android/build-cache/d4e5659d4f4fc411f22ba3f779b09d40beccc03f/output/jars/libs/internal_impl-23.0.1.jar(;;;;;;**.class)] (Duplicate zip entry [internal_impl-23.0.1.jar:android/support/v4/view/WindowInsetsCompat.class]))

I tried adding an exclude but I am not sure what I should exclude to remove this duplicate jars, any help would be appreciated it! Thank you in advance!

GRADLE:

compileSdkVersion 23
buildToolsVersion '25.0.2'

dependencies {
    compile ('com.google.android.gms:play-services-location:6.5.87') {
        exclude module: 'support-v4'
    }
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.4'
    compile 'info.hoang8f:android-segmented:1.0.6'

    //expandable recycler view **RECENTLY ADDDED AND GIVES ERROR**
    compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'

    //Testing
    testCompile 'junit:junit:4.12'
    testCompile 'org.robolectric:robolectric:3.1.4'

}

I also added this line on pro guard just incase but no luck:

-dontwarn com.bignerdranch.**
like image 768
paul590 Avatar asked Apr 14 '17 13:04

paul590


1 Answers

com.bignerdranch.android:expandablerecyclerview library uses support library version 24.2.1, whereas you also imported support lib version 23.0.1.

Either upgrade your support libs version to 24.2.1 or exclude support lib dependency from expandablerecyclerview library.

compile('com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1') {
    exclude group: 'com.android.support', module: 'support-v4'
}

Note, this may break expandablerecyclerview library, because it was written and tested with a newer support lib version.

like image 167
azizbekian Avatar answered Oct 22 '22 11:10

azizbekian