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?
Windows defender real time protection is causing instant run slow downs. Add your project folder to windows defender's list of exclusion.
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.
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
defaultConfig {
multiDexEnabled true
}
in your module level build file.
it worked for me, hope it worked for you too..!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With