1

I add

compile 'com.github.PhilJay:MPAndroidChart:v2.2.3' 

in my build.gradle file then it shows an error of duplicate entry:

1 2 Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: com/github/mikephil/charting/highlight/Highlight.class

I tried to use this method: [java.util.zip.ZipException: duplicate entry

but it shows error too.

My app build.gradle:

    apply plugin: 'com.android.application'

android {


    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "pl.skntaurus.tif"
        minSdkVersion 11
        targetSdkVersion 22
        multiDexEnabled = true


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }

}




repositories {
    maven { url "https://jitpack.io" }
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:22.0.3'
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:cardview-v7:21.0.3'
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.google.android.gms:play-services-appindexing:8.1.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.github.PhilJay:MPAndroidChart:v2.2.3'


}

Please help me...

Community
  • 1
  • 1

1 Answers1

0

Use multiDexEnabled truelike this in gradle. remove = sign between . clean or restart your project. I am using similar library. I also got this problem.

defaultConfig {
        applicationId "package.xxxx"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
Himanshu Shekher Jha
  • 1,334
  • 2
  • 14
  • 27