ligi
ligi

Reputation: 39539

Espresso with hamcrest 1.3

Is there a way to use Espresso with Hamcrest 1.3? I can get it to compile, but I end up with runtime exceptions:

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

Everything is fine when I use hamcrest 1.1

The root of the problem is this stuff:

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

the only solution I see at the moment is to comile espresso with hamcrest 1.3 - but I would love to use the stock version - so any Idea how to avoid using a own version would be nice!

Upvotes: 1

Views: 341

Answers (2)

ligi
ligi

Reputation: 39539

espresso 2.2 now uses hamcrest 1.3 so the problem is gone: https://plus.google.com/+AndroidDevelopers/posts/4a51oVb59H6

Upvotes: 0

denys
denys

Reputation: 6910

Try Espresso 2.0 where all the 3rd parties code is decoupled. It will solve your problem.

Upvotes: 0

Related Questions