Ben Groot Ben Groot - 4 months ago 128
Android Question

How to speed up Android Studio compilation process

Latest update:
Check out Android Studio 2.0 (preview) Instant Run it is awesome!!!!

I have found some tips (Building and running app via Gradle and Android Studio is slower than via Eclipse) to speed up the compilation process of Android Studio (Gradle) but I still think it is way too slow. It takes about 15 seconds to compile the project and run on the device.

The is already set to:



Awesome!!! Colleague of me reported that Jack and Jill might be the solution: I'm reading into it.

Checkout this explanation:

Edit 2:
New info on Jack and Jill!:

Edit 3:
Android Studio 2.0 seems to release us from all the burden! Check out "Instant Run".


The best to improve Gradle is configure this in your file

org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

With this configuration build time is often reduced from 2-3 minutes to 30 seconds or less. The most important part is the configureondemand attribute.

Edit: Set 3 gigas of memory required by the new option included in Android Studio 2.2 dexing-in-process