pra*_*cus 5 android gradle android-gradle-plugin android-studio-2.1
我之前使用的是android studio 1.5,我刚刚升级到2.1.但是在更新后我的构建需要花费更多的时间(现在从15秒到2分钟)
我在这里提到过的事情
在"设置"中启用离线工作
org.gradle.daemon=true
org.gradle.parallel=true
Run Code Online (Sandbox Code Playgroud)
在gradle.properties文件中@ C:\ Users\.gradle(Windows)
但仍然没有区别.如何减少构建时间?
你尝试过即时运行吗?
\n\n启用即时运行的步骤:
\n\n打开“设置”或“首选项”对话框。
导航到“构建、执行、部署”>“即时运行”,然后单击“更新项目”
参考:\n http://tools.android.com/tech-docs/instant-run
\n\n更多提示:链接
\n\n-Enable Configuration on Demand.\n-Use Gradle Daemon.\n-Newer versions of Gradle and Java are faster.\n-Avoid doing expensive things during the configuration phase.\n-Don\xe2\x80\x99t use dynamic dependencies (`x.y.+`).\n-Parallelize the build.\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
1312 次 |
| 最近记录: |