执行失败的任务“:packageAllDebugClassesForMultiDex” [英] Execution failed for task ':packageAllDebugClassesForMultiDex'

查看:303
本文介绍了执行失败的任务“:packageAllDebugClassesForMultiDex”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用一个项目新的Andr​​oid multidex支持。我有一些问题,与此异常:

I am try to use the new android multidex support for a project. I have some problem with this exception:

错误:执行失败的任务:shineV3:packageAllDebugClassesForMultiDex

Error:Execution failed for task ':shineV3:packageAllDebugClassesForMultiDex'.

java.util.zip.ZipException:重复的条目:COM /谷歌/安卓/ GMS /分析/内部/命令$ 1.class

java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command$1.class

有关问题。我用2个不同的jar包的依赖,有的班级将在classes.dex因为这两个罐子包含它们被复制。任何想法?
在此先感谢

about the problem. I use 2 different jar package as dependency, and some class will be duplicated in classes.dex because both jars contains they. any idea? thanks in Advance

推荐答案

对于那些正在进入这一点,我想通了,为什么这发生。对我来说,我是编译谷歌分析V2罐子以及充分发挥服务。谷歌可以让你打破玩什么服务,你真的需要为你的应用程序和编译的单个项目。检查出来这里。我排除了谷歌Analytics(分析)播放这是V4现在,它的工作

For those that are coming into this, I figured out why this was happening. For me it was that I was compiling the Google Analytics V2 jar as well as the full play services. Google allows you to break down what play services you really need for you app and compile those individual items. Check them out here. I excluded the Google Play Analytics which is on V4 right now and it worked

这篇关于执行失败的任务“:packageAllDebugClassesForMultiDex”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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