PHP中文网2017-04-17 17:41:39
Alibaba’s FreeLine https://github.com/alibaba/fr...
Compilation takes 3~5 seconds
PHP中文网2017-04-17 17:41:39
Use third-party solutions such as BUCK and LayoutCast. Ali’s FreeLine is also good. Here is a blog https://yq.aliyun.com/article...
巴扎黑2017-04-17 17:41:39
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.
ringa_lee2017-04-17 17:41:39
Put
in gradle.properties# 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.
阿神2017-04-17 17:41:39
Gradle
就是这么慢的,没办法,Android Studio 2.0
以上有Instant install
It can speed up compilation, but there is a problem with this function
ringa_lee2017-04-17 17:41:39
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
org.gradle.configureondemand=true
org.gradle.daemon=true
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.
大家讲道理2017-04-17 17:41:39
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,
天蓬老师2017-04-17 17:41:39
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.
伊谢尔伦2017-04-17 17:41:39
1. Increase the memory occupied by AS
-Xms256m
-Xmx4096m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
2. Turn on offline mode and search offline
in settings
For specific operations, just google it yourself, there are many tutorials
But the project is big, more than 1 minute is normal