0

Ich versuche, meine App auf Android Studio virtuellen Simulator zu bauen, ich habe erfolgreich getestet auf API-Ebene 21 und höher jetzt bin ich testen unteren Ebene api 19, aber immer wenn ich laufe, bekomme ich diesen Fehler:Ausführung fehlgeschlagen für transformClassesWithJarMergingForDebug '. (Volley)

Fehler: Ausführung fehlgeschlagen für Task ': app: transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class

Das ist mein gradle Datei:

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 25 
buildToolsVersion "25.0.0" 
defaultConfig { 
    minSdkVersion 15 
    targetSdkVersion 25 
    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' 
    } 
} 
} 
repositories { 
mavenCentral() 
} 

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.1.0' 
compile 'com.android.support:support-v4:25.1.0' 
compile 'com.android.volley:volley:1.0.0' 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'dev.dworks.libs:volleyplus:0.1.4' 
compile 'com.squareup.okhttp3:okhttp:3.5.0' 
compile 'com.google.android.gms:play-services-gcm:10.0.1' 
compile 'com.google.firebase:firebase-appindexing:10.0.1' 
compile 'com.android.support:design:25.1.0' 
compile 'com.roughike:bottom-bar:1.2.1' 
compile 'com.ncapdevi:frag-nav:1.2.2' 
compile 'me.dm7.barcodescanner:zxing:1.8.4' 
compile 'com.android.support:cardview-v7:25.1.0' 
compile 'com.android.support:recyclerview-v7:25.1.0' 
compile 'com.google.firebase:firebase-core:10.0.1' 
compile 'com.google.firebase:firebase-messaging:10.0.1' 
compile 'de.hdodenhof:circleimageview:2.1.0' 
compile 'com.loopj.android:android-async-http:1.4.9' 
compile 'net.gotev:uploadservice:3.0.3' 
compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
compile 'com.google.android.gms:play-services-auth:10.0.1' 
compile 'com.journeyapps:zxing-android-embedded:3.4.0' 
compile 'com.ogaclejapan.smarttablayout:library:[email protected]' 
compile 'com.ogaclejapan.smarttablayout:utils-v4:[email protected]' 
compile 'com.hedgehog.ratingbar:app:1.1.2' 
testCompile 'junit:junit:4.12' 
compile 'com.squareup.picasso:picasso:2.5.2' 
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' 

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

ich viele Lösung Online in Bezug auf diese gefunden haben, aber nicht speziell auf dieses Problem, glaube ich, das Problem mit volley, aber ich kann jede Bibliothek nicht entfernen durch zu meinem Code. Wie soll ich dieses Problem lösen? Vielen Dank!

Antwort

0

Sie verwenden zwei verschiedene Versionen von Volley Bibliotheken

compile 'com.android.volley:volley:1.0.0' 
compile 'com.mcxiaoke.volley:library:1.0.19' 

Verwendung irgendeiner der oben

und ich weiß nicht, über

compile 'dev.dworks.libs:volleyplus:0.1.4' 

Wenn die ähnliche Bibliothek über zwei ist , bleibt der Fehler weiterhin

+0

Ist es möglich, beide Bibliotheken zu verlassen? Da ich beide in meinem Projekt verwende. – JerryKo

+1

beide sind die gleiche Bibliothek warum willst du beides? – Redman

+0

Was ist in diesen Bibliotheken einzigartig, die Sie benötigen? @JerryKo – Nilabja

Verwandte Themen