我将Android Studio从0.9x升级到1.0 RC(包括1和2),我的项目构建时间从20秒增加到了约90秒。
有人遇到同样的问题吗?
更新
在终端上运行相同的任务,我发现“解析依赖项”步骤花费了大部分额外的时间。
更新2
感谢@bond的提示,我注意到离线会将构建时间降低到约30秒,因此我尝试在build.gradle中使用mavenLocal(),但是也没有成功。
顶层build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
}
}