I am developing android application for Home Automation using gradle in Android Studio. There is no problem when I build the project, but when I try to run the project, there is an error like this:
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: org/apache/http/params/CoreConnectionPNames.class
Here is my build.gradle codes:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.cpl"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.0.1'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:23.0.1'
compile files('libs/android.jar')
compile files('libs/bcprov-jdk15on-1.47.jar')
//compile files('libs/google-play-services.jar')
//compile files('libs/google-play-services1.jar')
compile files('libs/httpclient-4.2.3.jar')
compile files('libs/httpcore-4.3.jar')
compile files('libs/nineoldandroids-library-2.4.0.jar')
compile files('libs/Pubnub-Android-3.7.2.jar')
compile files('libs/renderscript-v8.jar')
compile files('libs/sun.misc.BASE64Decoder.jar')
compile files('libs/universal-image-loader-1.9.2.jar')
//compile files('libs/android-support-multidex.jar')
compile 'com.android.support:multidex:1.0.1'
}
please help me to solve this problem. Thank you anyway