Reputation: 82
I am trying to add the Parse SDK library to my android build but I receive the following error when I try to run my project:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/parse/AbstractQueryController$1.class
I have tried enabling multiDex which has not worked.
My gradle build is as follows:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.green.philip.budgetplannerdroid"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.parse:parse-android:1.12.0'
compile 'com.parse.bolts:bolts-android:1.4.0'
compile 'com.android.support:multidex:1.0.1'
}
Upvotes: 1
Views: 1345
Reputation: 364988
Your issue depends by
compile 'com.parse:parse-android:1.12.0'
This library has a dependency with com.parse.bolts:bolts-tasks:1.3.0
while com.parse.bolts:bolts-android:1.4.0
has a dependency with com.parse.bolts:bolts-tasks:1.4.0
.
It means that you are including the same library but with different versions.
Use:
compile ('com.parse:parse-android:1.12.0'){
exclude group: 'com.parse.bolts', module: 'bolts-tasks';
}
Upvotes: 1