我是espresso的新手,我正在尝试为我的Android应用程序编写测试用例。我在谷歌上搜索了导航抽屉菜单的测试用例。但是因为我无法导入
import static android.support.test.espresso.contrib.DrawerActions.closeDrawer;
import static android.support.test.espresso.contrib.DrawerActions.openDrawer;
import static android.support.test.espresso.contrib.DrawerMatchers.isClosed;
import static android.support.test.espresso.contrib.DrawerMatchers.isOpen;
所以请帮助我。提前谢谢
答案 0 :(得分:1)
将这些依赖项添加到app/build.gradle
文件中:
androidTestCompile("com.android.support.test.espresso:espresso-contrib:2.2.2") {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-v7'
exclude group: 'com.android.support', module: 'design'
exclude module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
希望它会有所帮助