I was using android studio 1.5 earlier and i just upgraded to 2.1.But after the update my builds are taking much more time(from 15 sec to 2 min now)
Things I have tried as mentioned here
Enabled offline work in Settings
org.gradle.daemon=true
org.gradle.parallel=true
in gradle.properties file @ C:\Users\.gradle (Windows)
But still no difference. How can I reduce the build time?
have you tried instant run?
Steps to enable instant run:
Open the Settings or Preferences dialog.
Navigate to Build, Execution, Deployment > Instant Run and click Update Project
ref: http://tools.android.com/tech-docs/instant-run
some more tips : link
I also face the same issue with Android Studio
Please uncomment the line
org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
and increase the org.gradle.jvmargs=-Xmx1024m to org.gradle.jvmargs=-Xmx2048m
in gradle properties file
also include
in your module level build file.
it worked for me, hope it worked for you too..!
From official source:
The video (Instant Run - Deep dive) on the official documentation page for Instant Run has a mention of this at around 7:40 (timestamp). It is strange that they have not put this down as text.