I'm working on android app that's running up against the dex method count limit. Is there a simple way to show the method count grouped by package? I can get the total method count, but my app has multiple components and I'm trying to figure out which component is the biggest contributor to this.
I've written a dex-method-counts
tool that outputs per-package method counts faster and more accurately than the smali-based tools referenced in JesusFreke's answer¹. It can be installed from https://github.com/mihaip/dex-method-counts.
[1] that script disassembles the .dex and re-assembles it by package, but this means that methods that are referenced by multiple packages are counted twice