android - 减少 android studio 2.1 构建时间

标签 android gradle android-gradle-plugin android-studio-2.1

我之前使用的是 android studio 1.5,我刚刚升级到 2.1。但是更新后我的构建花费了更多时间(从 15 秒到现在的 2 分钟)

这里提到的我已经尝试过的事情

Enabled offline work in Settings

org.gradle.daemon=true
org.gradle.parallel=true

in gradle.properties file @ C:\Users\.gradle (Windows)

但还是没区别。如何减少构建时间?

最佳答案

来自官方来源:

Windows defender real time protection is causing instant run slow downs. Add your project folder to windows defender's list of exclusion.

Instant Run 官方文档页面上的视频(即时运行 - 深度潜水)在 7:40(时间戳)左右提到了这一点。奇怪的是他们没有把它写下来。

关于android - 减少 android studio 2.1 构建时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37247256/

相关文章:

android - 找不到androidx.navigation :safe-args-gradle-plugin:1. 0.0-alpha01

java - 更改生产源代码位置

android - 按下放大镜时如何调用onSearchRequested

android - Unresolved reference Dagger 2 + kotlin + android gradle

java - Jackson lib gradle 的 Eclipse 类路径问题

android - Kotlin gradle.build ZipException 因为重复

java - 未找到类 "com.google.android.gms.common.app.GmsApplication"

android - 如何在我的 Maven 本地存储库中使用 gradle 发布现有的 aar?

java - 将 Android 的字符串资源与硬编码字符串连接起来

android - 忘记网络在 Android Marshmallow 中不起作用?