After change this settings my compile duration 10 minutes changed to ~10 secs.
Step 1:
Settings(ctrl+Alt+S) ->
Build,Execution,Deployment ->
Compiler ->
type "--offline" in command-line Options box.
Settings(ctrl+Alt+S) ->
Build,Execution,Deployment ->
Compiler ->
type "
--offline" in command-line Options box.
Step 2:
check the “Compile independent modules in parallel” checkbox.
& click Apply -> OK
check the “Compile independent modules in parallel” checkbox.
& click Apply -> OK
Reference - https://www.sundoginteractive.com/blog/speed-up-gradle-in-android-studio
Disadvantage:
You will not be able to pull down the latest versions of the dependencies identified in your build.gradle file. It runs faster because it uses a cached snapshot of those imported libraries.
Important Note: When you deploy the application remove this settings & build with latest versions of dependencies.
