Speed up gradle build in Android Studio.

Hi friends, have a great day. In android development, initially most of developers are learn on eclipse, then android studio came with a lot of features. Most of developers hate because of GRADLE. In eclipse, we using maven. But gradle is completely different.

Take a long time for making a build.

Please don't take seriously, if you have enough RAM, Internet and good speed of processor. :)

I give some suggestion to perform the faster gradle build.

1. Append the following lines in gradle.properties in your app.

# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# org.gradle.daemon=true

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects.
# org.gradle.parallel=true

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Enables new incubating mode that makes Gradle selective when configuring projects.
# Only relevant projects are configured which results in faster builds for large multi-projects.
# org.gradle.configureondemand=true

2. Please use absolute version of dependencies
    classpath 'io.fabric.tools:gradle:1.+'(Don't use like that)

3, File -> Settings -> Build, Execution, Deployment -> Build tools -> Gradle -> Check Offline work

4. Then finally, see below the image and follow be same.


Popular posts from this blog

Clear the app data programmatically in android

convert an integer to a string in java

Print the large string values in android log cat.