问题
When I build big multi module project, result apk contains a lot of dex files. 35 on debug version and 15 on release. Most of files has far less methods and references then 65k.
Is there any way to compact dex files?
I also analysed several famous applications from google, instagram, and others. They all have 4-6 almost full dexes. Nothing like we have. So looks like compaction is possible
We also suspect that such big amount of dex files can slowdown application startup. Is it the case?
When I run application on android 4 device, I can literally see in logs how dex files getting unpacked. I didn't profile it, but looks like the speed is more or less the same for every file, may be i wrong here.
AGP 3.4, Gradle 5.5
on debug version:
dex metrics on release version:
来源:https://stackoverflow.com/questions/57790068/too-many-dex-files