我有这个依赖关系,可以在我的build.gradle文件中很好地工作:
androidTestImplementation ('com.android.support.test.espresso:espresso-contrib:2.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
但是当我在versions.gradle中执行相同的操作时:
def support = [:]
support.appcompat = "com.android.support:appcompat-v7:$versions.support"
def test = [:]
test.contrib = "com.android.support.test.espresso:espresso-contrib:$versions.contrib"{
exclude group: 'com.android.support', module: 'support-v4'
}
support.test = test
deps.support = support
我收到此错误:
错误:找不到方法com.android.support.test.espresso:espresso-contrib:2.0()
如何在我的版本文件中排除该组?谢谢!