expandablerecyclerview

expandablerecyclerview

您好,我添加了一个新的依赖项,并在尝试运行该应用程序时开始出现以下错误:

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]))

我尝试添加排除对象,但不确定将这些重复的 jar 删除,应该排除什么,我们将不胜感激!先感谢您!

严重:
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'

}

我还在职业后卫上添加了这一行,以防万一但没有运气:
-dontwarn com.bignerdranch.**

最佳答案

com.bignerdranch.android:expandablerecyclerview库使用支持库版本24.2.1,而您也导入了支持库版本23.0.1

将支持库版本升级到24.2.1或从expandablerecyclerview库中排除支持库依赖项。

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

注意,这可能会破坏 expandablerecyclerview 库,因为它是使用较新的支持lib版本编写和测试的。

10-04 14:52