Why does assembleDebug takes much longer then project build and how to optimize it?

前端 未结 1 1411
被撕碎了的回忆
被撕碎了的回忆 2021-02-14 01:57

I\'ve been dealing with gradle build time in Android Studio recently. I\'ve managed to decrease the build time from about 3 mins to 10 seconds by removing some dependencies, but

相关标签:
1条回答
  • 2021-02-14 02:41

    Why:

    Recently I enabled multidex in my app because I had over 65k methods. Dexing is what was taking a lot of time to complete.

    How to speed up build:

    Go to Settings (Ctrl + alt + s) -> Build, Execution, Deployment -> Compiler

    Enabling compiling modules in parallel and adding --offline in compiler has decreased my execution time to about 15 seconds.

    0 讨论(0)
提交回复
热议问题