2017-08-28 2 views
0

Ich habe versucht, viele Lösungen, aber sie hat nicht funktioniert für mich Ich stehe diesen Fehler, wenn ich versuche App-Datei zu generieren:

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

und hier ist mein gradle:

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 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.android.volley:volley:1.0.0' //volley http request library 
compile 'com.nightonke:boommenu:2.1.0'   //navigation view 
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'   //refresh layout 
compile 'com.github.medyo:fancybuttons:1.8.3'  //custom button 
compile 'com.rengwuxian.materialedittext:library:2.1.4' //custom edittext 
compile 'com.jaredrummler:material-spinner:1.1.0' //custom spinner 
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.0' // progressbar button 
compile 'com.alimuzaffar.lib:pinentryedittext:1.3.1' //pin entry edit text 
compile 'com.android.support:design:25.3.1' 
compile 'com.android.support:recyclerview-v7:25.3.1' 
compile 'com.zarinpal:purchase:0.0.3-beta' 
compile 'com.android.support:multidex:1.0.1' 

compile ('com.github.ganfra:material-spinner:1.1.1'){ 
    exclude group: 'com.nineoldandroids', module: 'library' 
    exclude group: 'com.android.support', module: 'appcompat-v7' 
} 

testCompile 'junit:junit:4.12' 

}

+1

Haben Sie JAR-Dateien haben in' libs' Wenn ja, was sind sie – CommonsWare

+0

Mögliche Duplikat [Fehler:? Die Ausführung für die Task fehlgeschlagen ‚: app: transformClassesWithJarMergingForDebug '] (https://StackOverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug) –

+0

@CommonsWare Nein ich dont – Soroosh

Antwort

0

Ich schreibe diese Antwort für jeden, der "zarinpal" benutzt. Sie sollten nur Volley-Bibliothek von „zarinpal Bibliothek wie folgt ausschließen:

compile ('com.zarinpal:purchase:0.0.3-beta'){ 
     exclude group: 'com.mcxiaoke.volley', module: 'library' 
    } //zarinpal api 
0

ich ähnliches Problem hatte, während auf Jenkins macht bauen, bizarr wurde es auf meinem lokalen Rechner in Ordnung arbeiten. Nach dem Hinzufügen unter Ausschluss funktionierte es sowohl auf dem lokalen Rechner als auch auf Jenkins.

android{ 
    configurations { 
    all*.exclude group: 'com.android.volley' 
    } 
} 

Ich habe hinzugefügt Konfigurationen meiner App build.gradle innerhalb von Android-Abschnitt blockieren.

Wenn es die Version ist 22 Kompilieren SDK Materie und Version Build-Tools ist 25.0.0

Dieser arbeitete wie ein Charme.

+0

, die nicht für mich arbeitet – lvl4fi4

Verwandte Themen