Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Large Android projects - how to speed up build process?

Tags:

android

I have a relatively big Android project that contains about 200-250 resources, mainly .xml layouts. This means that when I modify and save one of them, the following rebuilding process takes about 1 min, which is damn annoying on the long run.

Could you recommend any tips that help on this matter?

like image 817
Zsombor Erdődy-Nagy Avatar asked Aug 19 '11 08:08

Zsombor Erdődy-Nagy


People also ask

Why does Android Studio take so long?

There may be many plugins in Android Studio that you are not using it. Disabling it will free up some space and reduce complex processes. To do so, Open Preferences >> Plugins and Disable the plugins you are not using.

Why does Gradle project take so long to sync?

Check your Internet connection. If internet speed is very slow gradle build will also take long time to build. I check by change my wifi internet connection with another one good speed connection. Now build time is normal.


2 Answers

Yes update to the latest Eclipse Android Plugin (ADT version 12), then go:

Window > Preferences > Android > Build > TICK 'Skip packaging and dexing until export...'

Preferences

This will stop building till you export, just like it saves, knocks a few seconds off your save time when editing XML files in a large project.

like image 197
Blundell Avatar answered Oct 04 '22 07:10

Blundell


Use ADT 12. Go to Preferences->Android->Build and check 'Skip packaging and dexing until export or launch'. Resources won't be compiled when you save, only when you run your project.

like image 29
Nikolay Elenkov Avatar answered Oct 04 '22 07:10

Nikolay Elenkov