droidnoob droidnoob - 8 months ago 45
Android Question

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. duplicate entry: com/loopj/android/http/AsyncHttpClient$1.class

i am getting an error for duplicate entry but I do not know why. This is my build.grade file.

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
applicationId "com.apppartner.androidprogrammertest"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled true
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.loopj.android:android-async-http:1.4.9'

I believe i have everything right and in place. What do i do?


Try to remove loopj library if the project compiled correctly then u need to check if u have another library or jar contain same classes with loopj