Read through this article, in particular the section on only including portions of Google Play Services in your app: https://developers.google.com/android/guides/setup
On Fri, Jul 17, 2015 at 10:32 AM Igor Ganapolsky <[email protected]> wrote: > Any update on this issue? I there a workaround at all? I am experiencing > severe DEX limitations in my project because of this. > > > On Tuesday, March 25, 2014 at 1:56:16 PM UTC-4, Jeff Campbell wrote: >> >> The latest version and the Google Play Services (4.3) now adds about >> 2,500 more methods (since 4.2)!! (Adding Google Play Services to your >> project will add about 14,000 methods to your app).... seems to be getting >> worse and worse! >> >> On Friday, February 7, 2014 2:14:50 PM UTC-7, Jeff Campbell wrote: >>> >>> We have an app that depends on a lot of libraries, and recently we >>> wanted to integrate Google Maps into our application. We learned that we >>> would have to add the following dependency to our app: >>> >>> compile 'com.google.android.gms:play-services:4.1.32' >>> >>> Before adding this dependeny, our app had about a 40k method count. >>> After adding this dependency our method count jumped to about 50k (about >>> 10k methods added to our apk!). And, it seems that with every new version >>> of this dependency it grows more and more (we noticed about a 2k growth in >>> the last update). >>> >>> I know that this dependency contains a LOT of different types of >>> services which include things we don't even use (which all contribute to >>> the 10k method count). I know that I can use Proguard to strip out >>> un-needed methods, but in a development environment this just slows down >>> build time, and can make debugging issues difficult. >>> >>> Could the Google Play Services be divided into seperate aar projects? >>> Example: >>> >>> play-services-core (required by all... assuming that there is some >>> shared code) >>> play-services-maps >>> play-services-games >>> play-services-ads >>> play-services-plus >>> play-services-wallet >>> etc.... >>> >>> Doing this would reduce the risk of apps hitting the 65k method limit >>> cap (seems crazy that a Google library takes 15% of the 65k limit of any >>> single app) >>> >>> Thanks, >>> Jeff >>> >>> >>> -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

