Over a million developers have joined DZone.

Google Play Services 5.0 is Here to Choke Your Apps

DZone's Guide to

Google Play Services 5.0 is Here to Choke Your Apps

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

Last week, Google Play Services 5.0 was released. There's been some talk recently that its swift growth may be beneficial when it comes to cleaning up fragmentation - if that's really a big deal, anyways - but there could be some drawbacks. According to Jake Wharton, in fact, there may be more drawback than benefit. He sums it up in the title of this recent post from his blog:

Play Services 5.0 Is A Monolith Abomination

According to Wharton, the new version of Play Services is really going to bloat your APK. He points to the dex limit as a major hurdle - 64,000 methods - because Play Services alone adds 20,000. That's a huge chunk taken up immediately, and it doesn't need to be that way. 

(20% of your dex limit, right here)

Wharton's not saying Play Services is useless, after all. In fact, he gives it a lot of credit:

A lot of really cool functionality is being put in Play Services. You’ll have a hard time making a compelling app that lives in the Google Play ecosystem without it. You should want to put it in your applications and not have to worry about the overhead it brings.

But it's not at all efficient:

Most of the library’s offerings are very disparate, having only the fact that they’re by Google as a common thread. This screams for small, modular artifacts which can be composed!

Just to illustrate the point, Wharton also provides a full breakdown of the packages added in Play Services 5.0 so you can get a feel for what, exactly, is clogging up your APK. On top of that, the packages are already configured such that partitioning would not be too much of a challenge - Wharton illustrates this, too.

You can find all the details in Wharton's full post, but the core idea is simple: Play Services is just getting too big. 

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}