TransformException:java.util.zip.ZipException:重复条目:

时间:2018-06-13 04:53:41

标签: java android

我正在尝试编译我的一个项目,我遇到了很多错误。这是我的gradle文件。我在build.gradle中为它添加了一些编译行。

之前的错误已得到解决,但我无法解决目前的错误。

    apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'
android {
    useLibrary 'org.apache.http.legacy'

    compileSdkVersion 23
    buildToolsVersion "25.0.3"

    defaultConfig {
        applicationId "com.newventuresoftware.waveformdemo"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


        packagingOptions {
            exclude 'META-INF/DEPENDENCIES.txt'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/DEPENDENCIES'
            exclude 'META-INF/notice.txt'
            exclude 'META-INF/license.txt'
            exclude 'META-INF/dependencies.txt'
            exclude 'META-INF/LGPL2.1'
        }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'commons-io:commons-io:+'
    compile 'com.android.support:design:23.1.1'
    compile project(':waveform')
    compile 'com.microsoft.cognitive:speakerrecognition:1.0.0'
    compile 'org.apache.httpcomponents:httpcore:4.4.1'
    compile 'org.apache.httpcomponents:httpclient:4.5'
    compile 'com.android.support:multidex:1.0.1'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'org.apache.httpcomponents:httpmime:4.3'
}

但是我收到以下错误。实际上问题始于httpclient,httppost等。我一直在调试,我达到了这一点。

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

0 个答案:

没有答案
相关问题