Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':packageAllDebugClassesForMultiDex'

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

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

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

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

like image 600
Deepak Jangir Avatar asked May 27 '15 13:05

Deepak Jangir


1 Answers

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

like image 101
Sree Avatar answered Sep 21 '22 10:09

Sree