【发布时间】:2017-07-07 08:45:51
【问题描述】:
我正在使用 gradle 版本 - 3.3-all 和 gradle 插件 - gradle:2.3.3
我想写测试用例。所以根据这个page,我在应用程序的顶部build.gradle 文件中包含了以下内容。
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
但我收到错误提示
Error:(11, 0) Gradle DSL method not found: 'testCompile()'
Possible causes:<ul><li>The project 'TopLevelProject' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
可能是什么问题?
【问题讨论】:
标签: android gradle android-gradle-plugin mockito android-testing