安卓应用:transformClassesWithJarMergingForDebug失败 - 抛出:Zip​​Exception:重复的条目 [英] Android :app:transformClassesWithJarMergingForDebug FAILED - ZipException: duplicate entry

查看:328
本文介绍了安卓应用:transformClassesWithJarMergingForDebug失败 - 抛出:Zip​​Exception:重复的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,如果我问一个重复的问题,但我无法找到此错误的解决方案。我上网计算器左右,现场的gradle,Android的博客,谷歌搜索但是没有几个小时一个可行的解决方案。我是一个机器人的初学者,所以我不知道如果我错过了在其他岗位的东西。

Sorry if I asked a duplicate question, but I couldn't find a solution for this error. I surfed around stackoverflow,gradle site, android blogs, google search but there wasn't a working solution for several hours. I'm an android beginner so I not sure if I have missed something in other posts.

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
         compileSdkVersion 23
         buildToolsVersion "23.0.0"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 22
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile 'com.android.support:appcompat-v7:22.2.1.'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta1'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
compile 'com.android.support:recyclerview-v7:22.2.1.'
compile 'com.android.support:cardview-v7:22.2.1.'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile files('libs/android-support-v4-22.2.1.jar')
compile files('libs/applovin-sdk-6.0.1.jar')
compile files('libs/appodeal-1.13.1.jar')
compile files('libs/chartboost-5.2.0.jar')
compile files('libs/my-target-4.0.13.jar')
compile files('libs/unity-ads-1.4.7.jar')
}

该项目工作正常,直到我从添加一些appodeal库(编译那些文件行)。我试图打造该项目,但给予的gradle错误。

The project was working fine until I add some libs from appodeal (those compile file lines). I have tried to build the project but gradle gave the errors.

:app:transformClassesWithJarMergingForDebug'.
com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/widget/RecyclerView$ItemDecoration.class

也有关于重复入门不知道为什么,我得到了他们同样的异常的2个错误:的android /支持/ V4 / PrintKitKat.class 的android /支持/ multidex / MultiDex $ V14.class

我试过的gradle升级,无效并重新启动,以清除缓存,忽略依赖然后重建/清洁工程,找出潜在的重复模块排除和搜索项目的的.class 但我发现没有重复。

I tried to upgrade gradle, invalidate and restart to clear cache, omit dependencies then rebuild/clean project, find potential duplicate module to exclude, and search projects for those .class but I found no duplication.

推荐答案

您可以测试把这个目录上的根在终端

You can test putting this on root of directory in the Terminal

./gradlew clean

这篇关于安卓应用:transformClassesWithJarMergingForDebug失败 - 抛出:Zip​​Exception:重复的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆