2017-07-24 1 views
0

Fehler :Execution failed for task ':app:transformClassesWithJarMergingForDebug'.com.android.build.api.transform.TransformException: java.util.zip.ZipException: Eintrag doppelt: com/google/common/base/FinalizableReference.class

com.android.build.api.transform.TransformException: java.util.zip.ZipException: doppelte Eintrag: com/google/common/base/FinalizableReference.class

Dies ist die Ausnahme Ich habe nach dem Kompilieren Google Guava-Bibliothek.

Hier ist das Problem eine andere Bibliothek die gleiche Klasse verwendet (Ausgabe duplicacy)

Haben alle notwendigen Dinge wie die Auflistung all die Bibliothek mein Projekt verwendet (../gradlew.bat Abhängigkeiten), aber gefunden keine doppelte Klasse

Unter meiner Gradle.

compile 'com.squareup.retrofit2:retrofit:2.1.0' 

compile 'com.squareup.okhttp3:okhttp:3.5.0' 

    compile 'com.squareup.retrofit2:converter-gson:2.1.0' 

    compile 'com.squareup.okhttp3:logging-interceptor:3.5.0' 

    /*Firebase*/ 

compile 'com.google.firebase:firebase-messaging:11.0.0' 

    compile 'com.android.support:appcompat-v7:25.3.1' 

compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' 

    compile 'com.android.support:design:25.3.1' 

    compile 'com.android.support:support-v4:25.3.1' 
    /*Header recyclerView*/ 

compile 'com.karumi:headerrecyclerview:1.1.0' 

testCompile 'junit:junit:4.12' 
    /*Custom snackBar*/ 

compile 'com.androidadvance:topsnackbar:1.1.1' 
    /*google services*/ 

compile 'com.google.android.gms:play-services-location:11.0.0' 

compile 'com.google.android.gms:play-services:11.0.0' 
    /*socket io*/ 

compile 'com.github.nkzawa:socket.io-client:0.3.0' 
    /*Map utils library*/ 

    compile 'com.google.maps.android:android-maps-utils:0.5+' 

compile 'org.greenrobot:eventbus:3.0.0' 

compile 'com.google.guava:guava:16.0.1' 

Antwort

0

versuchen dies die duplizierte Datei ausschließen, indem Sie unten Code in Ihrem gradle App-Modul

android { 


    buildTypes { 

} 
packagingOptions { 
    exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml' 
    exclude 'build-data.properties' 
} 

}

und versuchen, diese auch

compile('com.microsoft.azure:azure-mobile-services-android-sdk:2.0.2') { 
exclude module: 'guava' 
} 
+0

Danke, versucht dieses Update früher nicht in der Lage zu sortieren – logan

+0

@logan überprüfen aktualisiert ans –

+0

Ich bin mit diesem Problem auf Lollipop-Geräten konfrontiert, Marshmallow funktioniert gut. – logan

Verwandte Themen