当我添加意式浓缩咖啡时出现资源错误 [英] Resources error when I add espresso-contrib

查看:72
本文介绍了当我添加意式浓缩咖啡时出现资源错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将espresso-contrib库添加到我的gradle中时

When I include espresso-contrib library to my gradle

androidx.test.espresso:espresso-contrib:3.1.1

androidx.test.espresso:espresso-contrib:3.1.1

我没有同步问题,但是当我尝试运行测试时,在构建过程中出现以下错误:

I have no problems syncing but when I try to run a test I get the following errors in the build:

由于我的所有espresso依赖项都在androidX中,因此我无法返回com.android.support. 我认为这可能是由于appcompat对espresso-contrib的依赖.

I can't go back to com.android.support as all my espresso dependencies are in androidX. I think it may be due to appcompat dependency on espresso-contrib.

推荐答案

通过将compileSdkVersion设置为28来解决.

Solved by setting compileSdkVersion to 28.

显然,如果您迁移到AndroidX,则应该这样做.

Apparently you should do this if you migrate to AndroidX.

这篇关于当我添加意式浓缩咖啡时出现资源错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆