Android Studio搭建测试环境

1、依据官方文档进行如下配置:

Android Studio搭建测试环境_第1张图片

2、在build的时候可能会报依赖包冲突异常,在build.gradle中添加如下配置即可,参考资料在这里

// 这里是为了解决Espresso和项目中引入的依赖库版本不一致的问题

configurations.all {

resolutionStrategy.force"com.android.support:support-annotations:$rootProject.supportAnnotationLibraryVersion"

}

3、具体使用文档,参考这里

你可能感兴趣的:(Android Studio搭建测试环境)