簡體   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