java zip文件异常抛出

时间:2016-12-23 06:26:19

标签: android android-studio build.gradle

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class

并且有两个警告,如下所示:

1)警告:警告:依赖org.apache.httpcomponents:httpclient:4.0.1因发布而被忽略,因为它可能与Android提供的内部版本冲突。

2)警告:警告:依赖org.apache.httpcomponents:httpclient:4.0.1因调试而被忽略,因为它可能与Android提供的内部版本冲突。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    packagingOptions {
        exclude 'META-INF/NOTICE' // will not include NOTICE file
        exclude 'META-INF/LICENSE' // will not include LICENSE file
        exclude 'META-INF/DEPENDENCIES'
       // exclude'org.apache.httpcomponents:httpclient:4.0.1'

    }

    defaultConfig {
        applicationId "com.omgproductionsinc.panicsosplus"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        // Enabling multidex support.
        multiDexEnabled true

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    //compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':FacebookSDK')
    compile files('libs/httpclient-4.3.5.jar')
    compile files('libs/httpclient-cache-4.3.5.jar')

    compile files('libs/httpmime-4.3.5.jar')
    compile files('libs/splunk-mint-4.0.7.jar')
    compile (files('libs/twitpic4j.jar'))
    compile files(('libs/twitter4j-core-4.0.1.jar'))
    compile files(('libs/sendgrid-0.1.2-jar.jar'))
    compile files('libs/org.apache.http.legacy.jar')
    compile ('oauth.signpost:signpost-commonshttp4:1.2.1.2')
    compile ('oauth.signpost:signpost-core:1.2.1.2')
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.google.android.gms:play-services:5.0.89'

    //compile 'org.lucee:httpcomponents-httpcore:4.3.5'

}

0 个答案:

没有答案