Ich versuche, eine Bibliothek zu meinem Projekt hinzuzufügen, mein jetzt aktuelle build.gradle
ist:Fehler: java.util.zip.ZipException: doppelte Eintrag
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
repositories {
mavenCentral()
}
defaultConfig {
applicationId "com.example.guycohen.cheaters"
minSdkVersion 11
targetSdkVersion 21
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.whl.handytabbar:library:1.0.4'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:[email protected]'
compile 'com.daimajia.androidanimations:library:[email protected]'
}
Wenn ich hinzufügen, eine neue Bibliothek
compile 'com.github.navasmdc:PhoneTutorial:[email protected]'
ich diesen Fehler:
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: android/support/v4/print/PrintHelperKitkat$2$1.class
ich habe versucht, dieses Problem zu beheben, indem Sie das Hinzufügen
configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
Ich konnte in meinem Projekt keine doppelte Klasse finden.
Ich bin sicher, ob, wenn ich den doppelten Eintrag löschen könnte, würde es perfekt laufen, aber ich bin mir nicht sicher, wie ich es finden würde.
Danke für Ihr schnelle Antwort, ich bekomme immer noch Fehler: Ausführung fehlgeschlagen für Task ': app: packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: doppelten Eintrag: android/support/v4/print/PrintHelperKitkat $ 2 $ 1.Klasse ----------------> Ich verstehe nicht, warum ich Werde ich mich duplizieren, wenn ich die Support-Bibliothek ausschließe? es ist nicht einmal logisch. – XcodeNOOB
fügen Sie es Facebook-Abhängigkeit hinzu compile ('com.facebook.android:facebook-android-sdk:4.2.0') { exclude-modul: 'support-v4' } – varun
aktualisiert meine antwort – varun