Reference to:http://www.jianshu.com/p/61e8f803e0d1
Android in the development process, with the reference to the library as well as the increase in business, there will inevitably be the 64K limit problem, that is, the number of methods too many problems, Java code in the total number of method and field total cannot exceed 65,535, It is necessary to count how many of these are contained in each jar package, and Google has implemented such tools for us today:
Dexdump command (View the total number of method apk)
#查看apk的method总数dexdump-F app.apk | grep method_ids_size# View apk field Total Dexdump-f app.apk | grep field_ids_size
But this is just the apk file, if it is a jar package, the above command does not meet the requirements, then we can use the following command to achieve:
Xxx.jar Target Jar file
After generating the Temp.dex file, execute the following command:
Cat Temp.dex | HEAD-C 92 | Tail-c 4 | Hexdump-e ' "%d\n" '
After I have netty-3.9.5.Final.jar
calculated, I output 8302.
Using the Netty Library on Android is really heavyweight!
[Android] Android stats apk, jar package method number