大家好我有一个关于生成android studio签名的apk的问题。TransformClassesWithJarMergingForRelease Android
我对此有很多搜索,但在我的案例中找不到工作解决方案,我知道这是与重复类输入相关的问题,但任何人都可以告诉我需要排除哪些问题。
我尝试下面的事情,但那是行不通的。
{
exclude group: 'com.payu.custombrowser', module: 'customBrowser'
}
这是我得到,而错误产生的APK签署
Error:Execution failed for task ':transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/payu/custombrowser/BuildConfig.class
以下是我的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'
我没有任何想法我不得不排除解决这个有没有人知道慈祥地帮助我。
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
尝试运行一个干净的版本。 http://stackoverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug – razzledazzle