Android Studio is really handy. But the build speed is extremely slow!!!
!
I went online to find a lot of build acceleration settings, but not fit into my 1.3RC version ...
。
。 Heart plugs. No resistance, endure super invincible slow speed obstinately after a week. Of course, almost every day of the week to find the set ...
。
。
Until. Today.
I'm really happy and broken!
!
!
。!
!
!
!。!!!!
!
。!
!!!
!
!
!
!!。!!!
。!
。!
!
!
!!!
!
!!
。!!!
。!
。!
!
!!! aha haha haha haha
By chance, I got into the appendix. D. Gradle Command Line
Looked at the relevant command line. Set it up a bit. It's OK.
Hey
before setting. Compile to 5min+. Even 10min.After setting. Sometimes dozens of seconds. Sometimes 2 minutes or so. The feeling of flying up. That's nice.
.... Change 1: Maybe,
Here's how to set it up, in fact very easy. A few minutes.
(1) Setting up Android Studio
a) disabling plugins
File--Settings ... Plugins remove some of the plug-ins that are not practical.
For example: Git integration, GitHub, Google Cloud testing, Google Cloud Tools for Android Studio, Goole Login, Google Services, JavaFX, SDK Updater, Subversion integration, Terminal, testng-j.
(2) Setting Gradle
A) Turn on daemon
Gradle.properties
Org.gradle.daemon=true//android Studio uses daemon by default, so it can not be set.
Command line: –daemon
b) Start parallel mode
Gradle.properties
Org.gradle.parallel=true//Multiple decoupledproject, parallel compilation
File--Settings ... Build>compiler set –parallel–max-workers=4 in the command-line options
Command line:-parallel–max-workers=4
c) Demand
Gradle.properties
Org.gradle.configureondemand=true
File--Settings ... Build>compiler default Configure on Demand is checked
Command line:–configure-on-demand
d) offline (requires networking is set again)
File--Settings ... Build>build tools>gradle tick offline work
Related pictures:
Easy to copy command-line instructions:
–configure-on-demand–offline–parallel–max-workers=4
Because my computer is a 4-thread. So maxworkers = 4, assuming your computer is 8 threads. Setting to 8 would be better.
As to how to check their own computer is a few threads, Baidu Bar ~
Share it for the benefit of society ~~~~~~~~~~~
Maybe ———————————————
A week later. It took 600 of the ocean to buy an SSD and a memory strip, which was successfully compiled in 1 minutes. Away from the anxiety and irritability ~ ~
Android Studio version 1.3RC build acceleration