当前位置: 首页 > 知识库问答 >
问题:

Android:如何使用支持25.0.0的Espresso 2.2.2?

朱高丽
2023-03-14

我怎么才能让它起作用呢?类似的攻略我看了很多,唉。使用高于23.1.1的支持库多次失败。

dependencies {
  compile 'com.android.support:design:25.0.0'
  compile 'com.android.support:support-v4:25.0.0'
  compile files('libs/slf4j-android-1.5.8.jar')
  androidTestCompile 'com.android.support:support-annotations:25.0.0'
  androidTestCompile( 'com.android.support.test:rules:0.5')
  androidTestCompile( 'com.android.support.test.espresso:espresso-contrib:2.2.2')
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
 })
}

第三步:当然,我试了第一个gradlew:App:Dependenics等,但那个一直崩溃。是的,我使用JDK1.8。它是一个注册的bug,从夏天开始一直没有解决。

对了...Android、支持包、浓缩咖啡都是谷歌的?

共有1个答案

百里修真
2023-03-14

试试看

dependencies {
  compile 'com.android.support:design:25.0.0'
  compile 'com.android.support:support-v4:25.0.0'
  compile files('libs/slf4j-android-1.5.8.jar')
  androidTestCompile 'com.android.support:support-annotations:25.0.0'
  androidTestCompile('com.android.support.test:rules:0.5') {
               exclude module: 'support-annotations'
  }
  androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
               exclude module: 'espresso-core'
               exclude module: 'support-v4'
               exclude module: 'recyclerview-v7'
               exclude module: 'appcompat-v7'
               exclude module: 'support-annotations'
               exclude module: 'design'
  }
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
               exclude module: 'rules'
               exclude module: 'javax.annotation-api'
               exclude module: 'support-annotations'
  }

这就是我的工作设置--您基本上从所有Espresso依赖项中排除支持注释,并让它们使用从您的标准运行时依赖项中解析出来的注释。其他一些依赖项给我带来了麻烦,所以我也排除了它们,并让构建从显式的compile语句中解析它们。

 类似资料:
  • 需要什么步骤来使用这个库和构建我的应用程序与multidex支持?

  • 我开发android应用程序,经常使用注释作为编译时参数检查,大多是Android的支持注释。 java代码中的示例: 我不想使用枚举,因为它们在Android中存在性能问题。自动转换器到 kotlin 只会生成无效代码。如何在 kotlin 中使用注释?

  • 现在sslcontext返回SSLSOCKETFACTORY,我想使用SSLCertificateSocketFactory(对于sethostname方法)做什么..我希望问题是清楚的,如果不是让我知道或者随意说的更清楚

  • 问题内容: 我有一个对象,希望在JSON中作为RESTful资源使用。我已经启用了Jersey的JSON POJO支持(在web.xml中): 但是,当我尝试访问资源时,出现以下异常: 我要提供的类并不复杂,它只有一些公共final字段和一个设置所有这些的构造函数。字段是所有字符串,基元,与此类似的类或它们的列表(我尝试使用普通列表而不是通用List ,但无济于事)。有谁知道给什么?谢谢! Jav

  • 问题内容: 我有一个使用restify模块创建的REST api,我想允许跨域资源共享。最好的方法是什么? 问题答案: 您必须将服务器设置为设置跨源标头。不知道是否有内置的使用功能,所以我写了自己的功能。 我是从本教程中找到的。http://backbonetutorials.com/nodejs-restify-mongodb- mongoose/

  • 到底什么是宏呢? 我们把那些能自动执行某种操作的命令统称为“宏”。   宏也是一种操作命令,它和菜单操作命令都是一样的,只是它们对数据库施加作用的时间有所不同,作用时的条件也有所不同。菜单命令一般用在数据库的设计过程中,而宏命令则用在数据库的执行过程中。菜单命令必须由使用者来施加这个操作,而宏命令则可以在数据库中自动执行。   在OFFICE中,有很多种基本宏操作,这些基本操作还可以组合成很多其他