android转换异常

时间:2016-10-21 07:04:10

标签: android exception transform

当我尝试在装有Kitkat O.S的设备上运行项目时出现以下异常。我不确定这个错误是什么。它在棒棒糖设备上工作得很好。

例外:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class

的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"


    defaultConfig {
        applicationId "com.stackoverflow.application"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

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

        }

    }
}
repositories {
    jcenter()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:cardview-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile project(':payUMoneysdk')
}

1 个答案:

答案 0 :(得分:1)

看起来你的某个依赖项中已经有了一个volley库。

build.gradle

中删除以下行
compile 'com.android.volley:volley:1.0.0'