I get this error:
Error: execution completed for task ': app: transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org / apache / http / message / BasicHeaderElementIterator.class
Here is my build.gradle application level :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.chaitanya.livio"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies
{
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile('org.apache.httpcomponents:httpcore:4.4.4') {
exclude module: "httpmessage"
}
//compile ('org.apache.httpcomponents:httpclient:4.5.2')
compile 'com.android.support:multidex:1.0.1'
compile 'org.apache.httpcomponents:httpmime:4.5.2'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
}
I tried to check all redundant libraries, but did not find duplicate classes. I am new to Android programming and don't understand why I am getting this error.
source
share