我正在使用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).
可能是什么问题?
最佳答案
apply plugin: 'java'
关于android - 找不到Gradle DSL方法:testCompile(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44966415/