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 
"tools,platform-tools,android-23,extra-android-support,extra-android-m2repository,extra-google-google_play_services,extra-google-m2repository"

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.