工具地址:https://github.com/mihaip/dex-method-counts
使用方法:
- 使用项目中dex-method-counts.bat 生成 dex-method-counts.jar
- 把生成的jar和需要统计方法数量的apk 放到一个文件夹中(也可以不用文件夹,路径设置一下)
- 启动cmd,cd到这个文件夹中 执行 -java -jar dex-method-counts.jar xxx.apk (如图)
(如果不用文件夹则需要 在jar和apk前加上文件绝对路径)
- 回车看结果
注意结果中是你项目所有包的方法数,包含jar库等,请自行计算自己的方法数量