简体   繁体   中英

android studio generate signed apk

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' } 

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM