Hello Everyone i have one issue on generate signed apk with android studio.
I have search a lot on this but did't find working solution in my case, iknow this is the issue related to duplicate class entry but can anyone tell me which i need to exclude.
I try following thing but that's not working.
{
exclude group: 'com.payu.custombrowser', module: 'customBrowser'
}
This is the error which i'm getting while generate signed apk
Error:Execution failed for task ':transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/payu/custombrowser/BuildConfig.class
Following is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "company.app.appname"
minSdkVersion 9
targetSdkVersion 23
multiDexEnabled true
}
aaptOptions {
useNewCruncher false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
zipAlignEnabled true
}
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':hellochartslibrary')
compile project(':customBrowser')
compile project(':facebook')
compile 'com.android.support:support-v4:23.3.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:appcompat-v7:23.3.0'
I don't have any idea what i have to exclude for resolve this does anyone knows kindly help me.
EDIT NOTE:
If i directly run the app means without generate signed apk than its work fine there is no error log but it show me only when i'm trying to generate signed apk