android– 错误:任务执行失败’:app:transformClassesWithJarMergingForRelease’.随着发布

android– 错误:任务执行失败’:app:transformClassesWithJarMergingForRelease’.随着发布,第1张

概述WhenigeneratereleasebuildthenigotthiserrorError:Executionfailedfortask‘:app:transformClassesWithJarMergingForRelease’.>com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicateentry:android/arch/cor

When i generate release build then i got this error
Error:Execution Failed for task ‘:app:transformClassesWithJarMergingForRelease’. > com.android.build.API.transform.transformException: java.util.zip.ZipException: duplicate entry: androID/arch/core/internal/SafeIterableMap$ListIterator.class

   buildscript {    repositorIEs {        maven { url 'https://maven.fabric.io/public' }    }    dependencIEs {        classpath 'io.fabric.tools:gradle:1.23.0'    }}apply plugin: 'com.androID.application'apply plugin: 'io.fabric'repositorIEs {    maven { url 'https://maven.fabric.io/public' }}androID {    compileSdkVersion 26    buildToolsversion '26.0.2'    defaultConfig {        applicationID "com.hatchapps.multimedia"        minSdkVersion 16        targetSdkVersion 26        versionCode 17        multIDexEnabled = true        versionname "1.0"//        aaptoptions.cruncherEnabled = false//        aaptoptions.useNewCruncher = false        vectorDrawables.useSupportlibrary = true        testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner"    }    buildTypes {        release {//            MinifyEnabled false            multIDexEnabled = true            proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro'        }        deBUG {            MinifyEnabled true            proguardfiles getDefaultProguardfile('proguard-androID.txt'),                    'proguard-rules.pro'        }    }    packagingOptions {        exclude '.readme'        exclude 'meta-inf/DEPENDENCIES'        exclude 'meta-inf/notice'        exclude 'meta-inf/notice.txt'        exclude 'meta-inf/license'        exclude 'meta-inf/license.txt'        exclude 'meta-inf/NOTICE'        exclude 'meta-inf/liCENSE'        exclude 'meta-inf/ASL2.0'        exclude 'meta-inf/liCENSE'        exclude 'meta-inf/NOTICE'        exclude 'meta-inf/NOTICE.txt'        exclude 'meta-inf/liCENSE.txt'        exclude 'meta-inf/MANIFEST.MF'        exclude 'meta-inf/rxjava.propertIEs'        exclude 'meta-inf/services/javax.annotation.processing.Processor'        pickFirst 'AndroIDManifest.xml'    }    dexOptions {        javaMaxHeapSize "4g"    }}dependencIEs {    compile filetree(include: ['*.jar'], dir: 'libs')    androIDTestCompile('com.androID.support.test.espresso:espresso-core:2.2.2', {        exclude group: 'com.androID.support', module: 'support-annotations'    })    compile('com.crashlytics.sdk.androID:crashlytics:2.6.8@aar') {        transitive = true;    }    //noinspection GradleCompatible    compile 'com.androID.support:appcompat-v7:26.1.0'    compile 'com.androID.support.constraint:constraint-layout:1.0.2'    compile 'eu.inloop:localmessagemanager:0.1.5'    compile 'com.jakewharton:butterknife:8.8.1'    compile 'com.koushikdutta.ion:ion:2.2.1'    compile 'it.sephiroth.androID.library.targettooltip:target-tooltip-library:1.3.15'    compile 'com.androID.support:design:26.1.0'    compile 'com.androID.support:cardvIEw-v7:26.1.0'    compile 'de.hdodenhof:circleimagevIEw:2.1.0'    compile 'com.cocosw:bottomsheet:1.3.0@aar'    compile 'com.zhy:flowlayout-lib:1.0.3'    compile 'com.github.bumptech.glIDe:glIDe:3.7.0'    compile 'io.reactivex:rxandroID:1.2.1'    compile 'io.reactivex:rxjava:1.3.0'    compile 'com.andkulikov:Transitionseverywhere:1.7.4'    compile 'com.master.androID:permissionhelper:1.1'    compile 'net.alhazmy13.MediAPIcker:libary:2.3.2'    compile 'com.github.jaychang0917:SimpleText:1.2.1'    compile 'com.github.tabassumLatif:ShimmerRecyclerVIEw:0.1.2'    compile 'com.tomergoldst.androID:tooltips:1.0.6'    compile 'com.github.Pixplicity:sharp:03c1568d26'    compile 'ID.zelory:compressor:2.0.0'    compile 'com.github.danikula:AndroIDVIDeoCache:v2.7.0'    compile ('com.Google.firebase:firebase-messaging:11.0.2'){        force = true    }    compile 'com.fenchtose:tooltip:0.1.5'    compile 'com.Jsibbold:zoomage:1.1.0'    compile 'at.blogc:expandabletextvIEw:1.0.3'    compile 'com.github.douglasjunior:androID-simple-tooltip:0.2.1'    compile 'com.theartofdev.edmodo:androID-image-cropper:2.4.7'    compile 'com.oginotihiro:cropvIEw:1.0.0'    compile 'com.androID.support:multIDex:1.0.1'    compile 'com.wonderkiln:camerakit:0.11.0'    testCompile 'junit:junit:4.12'    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'    compile('com.androID.support:support-v4:26.1.0'){        force = true    }}apply plugin: 'com.Google.gms.Google-services'

    // top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositorIEs {        jcenter()    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:3.0.0'//        classpath 'com.neenbedankt.gradle.plugins:androID-apt:1.8'        classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'//        classpath 'com.Google.firebase:firebase-plugins:1.0.5'        classpath 'com.Google.gms:Google-services:3.0.0'//        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.3"        // NOTE: Do not place your application dependencIEs here; they belong        // in the indivIDual module build.gradle files    }}allprojects {    repositorIEs {        jcenter()        maven { url "https://jitpack.io" }        maven { url "https://plugins.gradle.org/m2/" }        /*maven {            url "https://maven.Google.com"        }*/        Google()    }}task clean(type: Delete) {    delete rootProject.buildDir}

解决方法:

阅读评论,并自己解决这个问题,问题似乎源于一个糟糕的第三方库.也许使用不兼容的gradle或buildtool库.

问题库:

> com.wonderkiln:camerakit:0.11.0
> androID.arch.persistence.room
> com.mapBox.mapboxsdk:mapBox-androID-plugin-locationlayer

其他人在/ libs文件夹中的坏库有类似的问题.

总结

以上是内存溢出为你收集整理的android – 错误:任务执行失败’:app:transformClassesWithJarMergingForRelease’.随着发布全部内容,希望文章能够帮你解决android – 错误:任务执行失败’:app:transformClassesWithJarMergingForRelease’.随着发布所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1100181.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存