我正在Android Studio中使用gradle開發Android應用程序。還有,當我生成項目沒有問題,但是當我嘗試運行該項目,有這樣的錯誤:錯誤':app:packageAllDebugClassesForMultiDex'。 > java.util.zip.ZipException:重複條目:
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: org/apache/http/params/CoreConnectionPNames.class
這裏是我的build.gradle代碼:
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'
}
請幫助我解決這個問題。謝謝你的好意
什麼是編譯的文件(「庫/的android.jar」)是指 – theLazyFinder
從您的build.gradle文件 – 2015-09-14 04:31:52