Android build speed - slow updating android sdk

Does anyone have any suggestions for improving build speed for Android?

With our small app that takes about 9-10 mins to get through CI (almost 30 with some basic espresso tests), it spends almost half the time (4 mins) doing this on every build:

$ echo y | android update sdk --no-ui --all --filter 

Is there a way to speed this up somehow? Guessing it can’t be cached?? It seems like everyone would benefit if it was somehow an option to start with the latest Android tools?

And maybe I’m missing something fundamental and there’s a trivial answer! Thanks in advance.

1 Like

Besides making sure you’re only installing sdk packages that are required, no, not afaik. My builds take about 24 minutes, and they have espresso and robolectric tests. I find the gradle daemon does speed up builds, if you have multiple gradle invocations.

1 Like

:+1: I’d love to see Android deps install faster.