出了什么问题:任务执行失败':app:transformClassesWithJarMergingForDebug'

时间:2016-12-09 11:40:04

标签: android

出了什么问题: 任务':app:transformClassesWithJarMergingForDebug'执行失败。

  

错误:任务执行失败> ':应用程序:transformClassesWithJarMergingForDebug'。 > > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:> COM /机器人/凌空/请求$ Priority.class

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.the.ex"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    testCompile 'junit:junit:4.12'

   /* compile 'com.android.support:appcompat-v7:23.2.0'
    compile 'com.android.support:design:23.2.0'*/
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
    compile 'org.jsoup:jsoup:1.8.3'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.android.gms:play-services:9.0.0'
    compile project(':payUMoneysdk')

}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

在Android {}正文中添加这些内容:

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'
}