espresso依赖项总是令人困惑的添加内容

时间:2016-04-08 10:59:34

标签: android android-espresso

Android Studio 2.1 Preview 5

我想知道我应该在build.gradle文件中包含什么来使用浓缩咖啡。我google的所有内容我都会得到不同的依赖项组合。

我有人这样做:

androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'

并从此网站https://google.github.io/android-testing-support-library/docs/espresso/setup/

androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'

任何人都可以提供我应该遵循的标准方式吗?

非常感谢任何建议,

1 个答案:

答案 0 :(得分:1)

这取决于您使用的浓缩咖啡的版本。 {更新版本2.0的testing-support-lib:0.1 was correct

如果您想使用Espresso 2.2.2,这是正确的:

androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'

对于较新版本,说明将更新here