【发布时间】:2016-11-05 16:51:20
【问题描述】:
我认为 Android Studio 会在生成签名 apk 之前运行测试。
但是 AS 并没有为我这样做。打包我的 apk 之前不好,我需要自己运行测试。
我不确定 dependsOn 或其他方式是否可以帮助我。我不确定我的 build.gradle 是否有错误。
gradle中的一些相关代码可能是这样的:
defaultConfig {
applicationId "com.xx.xx"
versionCode getDefaultVersionCode()
minSdkVersion 19
targetSdkVersion 19
}
dependencies {
testCompile 'org.robolectric:robolectric:3.0'
testCompile 'junit:junit:4.12'
}
testOption不是我写的。
我的目录是这样的(前面的内容是包名):
【问题讨论】:
标签: android-studio gradle android-gradle-plugin android-testing