gradle单元测试错误superClassName is empty

执行gradle build时构建失败,有如下错误提示:

1
2
3
4
5
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> superClassName is empty!

此问题的描述见GRADLE-1682,解决办法为在build.gradle配置文件中添加如下行:

1
2
3
4
tasks.withType(Test){
scanForTestClasses = false
include "**/*Test.class"
}

===
[erq]