# Default value: -Xmx10248m -XX:MaxPermSize=256m
#org.gradle.daemon=false
#org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
It should be better if you loosen some configurations here.
Depending on the amount of code you have, one minute can be long or short, and gradle is indeed not fast. In addition to adding org.gradle.parallel=true to gradle.properties, you can also choose to add
Using the latter requires some machine memory. It depends on the situation. The former may cause the compilation results to be inconsistent with expectations. If your project does not have a very special structure, it does not matter.
linux system + solid state (this is more important). This can improve a lot of efficiency. Removing some unused images and files can also improve speed. The application of ubuntu 14 i3-4170 8G 23M is 40 seconds,
Write the functions that need to be tested separately into UnitTest to reduce the number of times you need to start the entire APP test, which should improve your happiness.
In addition, as mentioned above, it would be good to switch to a solid state, and a cpu i3 can also be used.
Alibaba’s FreeLine https://github.com/alibaba/fr...
Compilation takes 3~5 seconds
Use third-party solutions such as BUCK and LayoutCast. Ali’s FreeLine is also good. Here is a blog https://yq.aliyun.com/article...
Actually, I think 1 minute is not too slow.
Or you can upgrade Android studio to 2.0 or above, which has a new feature of fast compilation.
Put
in gradle.propertiesIt should be better if you loosen some configurations here.
Gradle
就是这么慢的,没办法,Android Studio 2.0
以上有Instant install
It can speed up compilation, but there is a problem with this functionOne minute goes by quickly. Mine can take a nap.
Depending on the amount of code you have, one minute can be long or short, and gradle is indeed not fast. In addition to adding org.gradle.parallel=true to gradle.properties, you can also choose to add
Using the latter requires some machine memory. It depends on the situation. The former may cause the compilation results to be inconsistent with expectations. If your project does not have a very special structure, it does not matter.
linux system + solid state (this is more important). This can improve a lot of efficiency. Removing some unused images and files can also improve speed. The application of ubuntu 14 i3-4170 8G 23M is 40 seconds,
Write the functions that need to be tested separately into UnitTest to reduce the number of times you need to start the entire APP test, which should improve your happiness.
In addition, as mentioned above, it would be good to switch to a solid state, and a cpu i3 can also be used.
1. Increase the memory occupied by AS
2. Turn on offline mode and search
offline
in settingsFor specific operations, just google it yourself, there are many tutorials
But the project is big, more than 1 minute is normal