[aerogear-dev] Android Dependencies and DEX Size

Artur Dryomov artur.dryomov at gmail.com
Fri Aug 21 07:16:22 EDT 2015


Hi everyone,

So, I’ve just hit the famous 65 K methods count and DEX error as a sweet
bonus while updating the application to latest Android 6.0-related
dependencies.

Long story short, I’ve analyzed [1] dependencies [2] for the Hawkular
Android Client [3]. Important notice—the application is not that big or
complicated.

Methods count is below.

   - Various dependencies: 2445.
   - Java & JavaX: 1684.
   - Android Support libraries: 12988.
   - Android: 3081.
   - Google Play Services: 22022.
   - Bouncycastle: 10423.
   - Spongycastle: 10423.
   - AeroGear: 1210.
   - Application itself: 1047.
   - Total: 65346.

This is kind of disappointing. Of course I can start to blame Android
Support libraries, but you clearly cannot develop apps these days without
using backports and helpers. Google Play Services is a bigger deal. It is a
dependency of the AeroGear Push module and you cannot live without it as
well, but you can use a modular dependency. I’ve addressed this in an issue
[4] which leads to another one [5]. It was fixed (there is Google Play
Services 7.8.0 already though), but not released. Bouncycastle and
Sprongycastle are related to security and are dependencies of the AeroGear
Store module which is a dependency of the AeroGear Authz module. I’m not
really sure I need this at all.

Let’s count again.

   - The current application: 65346 methods.
   - The application without Google Play Services and Castles: 22478.

The application can be (65346 ÷ 22478 = 2.9) times smaller.

What do you think about? Is there any chance to ditch these Castle
dependencies and release the new Push version?

Regards,
Artur.

[1]: http://inloop.github.io/apk-method-count
[2]: http://pastie.org/private/27y3igg4imyqfjvs9qz9a
[3]: https://github.com/hawkular/hawkular-android-client
[4]: https://issues.jboss.org/browse/AGDROID-432
[5]: https://issues.jboss.org/browse/AGDROID-351
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150821/db6fb663/attachment.html 


More information about the aerogear-dev mailing list