com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / multidex / MultiDex $ V14.class

时间:2017-09-19 01:40:59

标签: android multidex

这是我的build.gradle,当我运行app时,它会报告此错误信息:

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。

  

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / multidex / MultiDex $ V14.class

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':library')
    compile project(':pullToRefreshLibrary')
    compile files('libs/flame.jar')
    compile files('libs/httpclient-4.2.4.jar')
    compile files('libs/httpcore-4.2.4.jar')
    compile files('libs/httpmime-4.2.4.jar')
    compile files('libs/mp3agic.jar')
    compile files('libs/libammsdk.jar')
    compile files('libs/ShareSDK-Core-2.8.3.jar')
    compile files('libs/oraleval-android-sdk.jar')
    compile 'fm.jiecao:jiecaovideoplayer:5.5.2@aar'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.google.android.gms:play-services-appindexing:8.4.0'
    //google play
    compile 'com.uwetrottmann.photoview:library:1.2.4'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
    compile 'com.wdullaer:materialdatetimepicker:2.5.0'
    compile 'com.getui:sdk:2.9.5.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:support-v4:23.0.0'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    //Logger
    compile 'com.orhanobut:logger:2.1.1'
    compile files('libs/xUtils-2.6.14.jar')
    compile files('libs/mta-sdk-1.6.2.jar')
    compile files('libs/open_sdk_r5793.jar')
    //wechat
    compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.0.2'
    //banner
    compile 'com.youth.banner:banner:1.4.9'
    //recyclerview
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.nineoldandroids:library:2.4.0'
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    //cardview
    compile 'com.android.support:cardview-v7:23.1.1'
    compile files('libs/AndroidPicker-1.5.3.jar')
    compile 'com.tencent.bugly:crashreport:latest.release'
    compile 'com.tencent.bugly:nativecrashreport:latest.release'
    compile files('libs/fastjson-1.2.5.jar')
    compile project(':photodraweeview')
    compile 'com.facebook.fresco:fresco:0.11.0'
    compile 'com.facebook.fresco:animated-gif:0.11.0'
    compile 'org.litepal.android:core:1.5.0'
    compile 'com.jcodecraeer:xrecyclerview:1.3.2'
    compile files('libs/giisosdk.jar')
    compile 'com.android.support:multidex:1.0.1'
 }

1 个答案:

答案 0 :(得分:0)

首先,您需要为支持库使用相同的版本,如下所示:

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

然后尝试只使用JSON库,gson或fastjson之一:

compile 'com.google.code.gson:gson:2.7'
//compile files('libs/fastjson-1.2.5.jar')