0
在Android工作室,包括濃縮咖啡時,在我的Android項目gradle.build
下谷歌的說明我有不支持的方法的gradle instrumentTestCompile:
https://code.google.com/p/android-test-kit/wiki/Espresso#Espresso_Setup_Instructions。不受支持gradle這個方法instrumentTestCompile
gradle.build:
dependencies {
instrumentTestCompile files('libs/espresso-1.1.jar',
'libs/testrunner-1.1.jar',
'libs/testrunner-runtime-1.1.jar')
instrumentTestCompile 'com.google.guava:guava:14.0.1',
'com.squareup.dagger:dagger:1.1.0',
'org.hamcrest:hamcrest-core:1.1',
'org.hamcrest:hamcrest-integration:1.1',
'org.hamcrest:hamcrest-library:1.1'
}
完全錯誤:
Build script error, unsupported Gradle DSL method found: ‘instrumentTestCompile()’!
Possible causes could be:
– you are using Gradle version where the method is absent
– you didn’t apply Gradle plugin which provides the method
– or there is a mistake in a build script
由於沒有在SO上找到答案,因此出於文檔目的。 – 2014-11-05 17:30:52
那個和testCompile有什麼區別? – 2015-04-06 20:18:28
它在這裏回答:http://stackoverflow.com/questions/29021331/confused-about-testcompile-and-androidtestcompile-in-android-gradle – 2015-04-07 07:07:50