debug { testCoverageEnabled = true }的坑

如果在build.gradle中加上
debug {
testCoverageEnabled = true
}

经过我测试,在如下环境,可以正常build,比这个环境版本高的话,很可能会一直卡在build阶段

1 版本支持库
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'

2
targetSdkVersion 23
compileSdkVersion 23
buildToolsVersion 23.0.3

3 gradle版本
在gradle-wrapper.properties文件中
distributionUrl=https://services.gradle.org/distributions/gradle-2.13-all.zip
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}

版本查询参考
Android Plugin for Gradle Release Notes
https://developer.android.com/studio/releases/gradle-plugin.html

SDK Build Tools Release Notes
https://developer.android.com/studio/releases/build-tools.html

Support Library Revision Archive
https://developer.android.com/topic/libraries/support-library/rev-archive.html

你可能感兴趣的:(debug { testCoverageEnabled = true }的坑)