相关疑难解决方法(0)

找不到Gradle DSL方法:test()

试图build.gradle在Android-Studio 1.2中的文件末尾添加以下代码(如本文所述):

test {
    testLogging {
        events "passed", "skipped", "failed", "standardOut", "standardError"
    }
}
Run Code Online (Sandbox Code Playgroud)

但得到了:

Error:(40, 0) Gradle DSL method not found: 'test()'
Possible causes:
- The project 'xxxxx' may be using a version of Gradle that does not contain the method.
- The build file may be missing a Gradle plugin.
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

unit-testing gradle android-studio

5
推荐指数
1
解决办法
2184
查看次数

标签 统计

android-studio ×1

gradle ×1

unit-testing ×1