繁体   English   中英

AndroidStudio,java.util.zip.ZipException

[英]AndroidStudio, java.util.zip.ZipException

我有两部测试手机,一部是三星Galaxy S5,另一部是LG G2。

每当我尝试在LG G2上运行我的应用程序时,都会出现以下错误。

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: 
java.util.zip.ZipException: duplicate entry: 
com/google/android/gms/gcm/PendingCallback.class

该应用程序可以在S5上完美运行,但G2出现错误。 S5的OS版本是6.0.1,而G2是4.4。

我该怎么办? 我在这里附加了build.gradle。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "xxxx"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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'
    })

    compile files('libs/ajt-2.9.jar', 'libs/javaml-0.1.7.jar')
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services:11.0.1'
    compile 'com.firebase:firebase-jobdispatcher:0.6.0'
    compile 'org.jsoup:jsoup:1.7.3'

    testCompile 'junit:junit:4.12'
}

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

您是否尝试过这里的建议:

https://github.com/firebase/firebase-jobdispatcher-android/issues/3

compile ("com.firebase:firebase-jobdispatcher:0.6.0") {
        exclude module: "play-services-gcm"
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM