【问题标题】:Espresso with hamcrest 1.3意式浓缩咖啡配 hamcrest 1.3
【发布时间】:2015-02-17 14:32:47
【问题描述】:

有没有办法在 Hamcrest 1.3 中使用 Espresso?我可以编译它,但最终会出现运行时异常:

java.lang.NoClassDefFoundError: android/support/test/espresso/Espresso

当我使用 hamcrest 1.1 时一切都很好

问题的根源是这个东西:

VFY: unable to resolve static method 31131: Lorg/hamcrest/Matchers;.is (Ljava/lang/Object;)Lorg/hamcrest/Matcher;

目前我看到的唯一解决方案是将 espresso 与 hamcrest 1.3 搭配使用 - 但我很想使用库存版本 - 所以任何如何避免使用自己的版本的想法都会很好!

【问题讨论】:

标签: android android-espresso hamcrest


【解决方案1】:

尝试 Espresso 2.0,其中所有第 3 方代码都已解耦。它会解决你的问题。

【讨论】:

    【解决方案2】:

    espresso 2.2 现在使用 hamcrest 1.3,所以问题消失了:https://plus.google.com/+AndroidDevelopers/posts/4a51oVb59H6

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多