android gradle packageAllDebugClassesForMultiDex

android gradle packageAllDebugClassesForMultiDex

我尝试使用混淆器,但收到 gradle 错误。 请帮我确定错误并解决。我如何从 buid dex 中排除重复项。

* What went wrong: Execution failed for task ':DEESVOC_FREE:packageAllDebugClassesForMultiDex'.

java.util.zip.ZipException: duplicate entry: com/google/api/client/googleapis/extensions/android/accounts/package-info.class

build.gradle

apply plugin: 'com.android.library'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

defaultConfig {
    minSdkVersion 9
    multiDexEnabled true
    renderscriptTargetApi 22
    renderscriptSupportModeEnabled true
    targetSdkVersion 21
}

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

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        jniLibs.srcDirs = ['ndk']
        assets.srcDirs = ['assets']
    }
}

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}
}
afterEvaluate {
    tasks.matching {
        it.name.startsWith('dex')
    }.each { dx ->
        if (dx.additionalParameters == null) {
            dx.additionalParameters = ['--multi-dex']
        } else {
            dx.additionalParameters += '--multi-dex'
        }
    }
}

repositories {
    jcenter()
}

dependencies {
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.google.code.gson:gson:2.3'
//    compile 'com.google.guava:guava:18.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services-base:7.8.0'
    compile 'com.google.android.gms:play-services-analytics:7.8.0'
    compile 'com.google.android.gms:play-services-drive:7.8.0'

compile files('libs/renderscript-v8.jar')
compile files('libs/android-async-http-1.4.6.jar')
compile files('libs/gdata-client-1.0.jar')
compile files('libs/gdata-core-1.0.jar')
compile files('libs/gdata-spreadsheet-3.0.jar')
compile files('libs/google-api-client-1.19.1.jar')
compile files('libs/google-api-client-android-1.19.1.jar')
compile files('libs/google-http-client-1.19.0.jar')
compile files('libs/google-http-client-android-1.19.0.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jsr305-1.3.9.jar')
compile files('libs/ormlite-android-4.49-SNAPSHOT.jar')
compile files('libs/ormlite-core-4.49-SNAPSHOT.jar')
compile files('libs/sqlite4java.jar')

compile 'com.nhaarman.supertooltips:library:3.0.0'
compile 'com.parse.bolts:bolts-android:1.2.1'
compile 'com.apptentive:apptentive-android:1.7.4@aar'

compile fileTree(dir: 'parse_libs', include: 'Parse-*.jar')
}

请尝试清洁,它适合我