ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

TransformClassesWithJarMergingForRelease Android

2019-07-06 08:33:30  阅读:187  来源: 互联网

标签:android apk signed android-multidex payu


你好每个人我有一个问题生成与android工作室签署的apk.

我在这方面搜索了很多,但在我的情况下找不到工作的解决方案,我知道这是与重复的类输入相关的问题但是任何人都可以告诉我哪些我需要排除.

我尝试跟随的东西,但那不起作用.

 {
    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

解决方法:

您已经使用compileTree指令引用那些jar文件,因此可能不需要所有这些编译文件条目.

此外,编译’com.google.android.gms:play-services:8.4.0′,你包括整个Play服务,有一些模块化版本可能有助于首先避免MultiDex.

标签:android,apk,signed,android-multidex,payu
来源: https://codeday.me/bug/20190706/1395797.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有