Che*_*rra 19 android gradle android-studio
我已经将Android Studio从0.9x更新到1.0 RC(1和2),我的项目构建时间从20秒增加到大约90秒.
任何人都有同样的问题?
UPDATE
在终端上运行相同的任务,我看到"解决依赖关系"步骤占用了大部分额外时间.
更新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()
}
}
Run Code Online (Sandbox Code Playgroud)
who*_*ows 32
在编译器设置(Android Studio - >首选项 - >项目设置[ 您的项目 ] - >编译器(基于Gradle的Android项目))中,在"命令行选项"框中键入--offline.
从约4分钟到约20秒.
Che*_*rra 30
我最终在网上建立了第一次,然后切换到离线模式
这将时间缩短到约14秒.
我的猜测是gradle试图在线解决依赖关系忽略我的"mavenLocal()"(及其所有变种)
归档时间: |
|
查看次数: |
13898 次 |
最近记录: |