1

I need help with this:

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/github/mikephil/charting/highlight/Highlight.class

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "cqdevelopers.incrediblediet"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
repositories {
    maven { url "https://jitpack.io" }
}



dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:cardview-v7:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.3.0'
    compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
    compile 'com.github.PhilJay:MPAndroidChart:v2.2.5'
    compile files('libs/GraphView-4.0.1.jar')
    compile 'com.android.support:support-v4:23.3.0'
    compile 'com.google.zxing:core:3.2.0'
}
Phiter
  • 14,570
  • 14
  • 50
  • 84
  • Try and see if [this](http://stackoverflow.com/questions/26966843/java-util-zip-zipexception-duplicate-entry-during-packagealldebugclassesformult) question can help you – Vucko Jun 08 '16 at 20:08
  • does GraphView also have a Highlight class? as that is what the error message is telling you that its in two areas..once in your source code and somewhere else in the deps you have – Fred Grott Jun 08 '16 at 21:10

1 Answers1

0

on Windows, Ctrl + N : search your class "Highlight"

after knowing which are those two are more libraries which are causing this issue, to find app dependency structure, execute

  gradlew app:dependencies 

command to find out hierarchy and exclude one of them.

Prashant
  • 112
  • 8