Latest update: Check out Android Studio 2.0 (preview) Instant Run it is awesome!!!!
I have found some tips (Building and running app
There are two main tasks to configure your build to reduce the build time.
First, you have to configure your compilation with special flags to make it faster. Edit your gradle.properties or local.properties files as follow:
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
android.enableBuildCache=true
Explanation:
dexing-in-process. If your computer doesn't have enough memory you can adjust this attribute to something more appropriate for your setup. 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.
More info here to configure Android Studio parameters
First, one is compiling your project with a minSDKVersion >= 21*. If your app has lower min SDK version you can create a special productFlavour for development purposes as follow:
productFlavors {
production {
minSdkVersion 15
...
}
development {
minSdkVersion 21
...
}
}
*Important, with Android Studio 2.4 this is not needed anymore because the IDE make this automatically.