Skip to content

Espresso2.0 (bundled with guava) - NoSuchMethodError while initializing Espresso #124

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1.Built my test apk
2.Tried to run on Android L(Nexus 5) - device
3.Part of my code calling 
'android.support.test.espresso.Espresso.registerIdlingResources'

What is the expected output?
Espresso test should run normally.

What do you see instead?
Test failed while initializing espresso class saying 'no such method error'

What version of the product are you using? On what operating system?
espresso.2.0[bundled with dependencies guava, dagger .. ] with hamcrest 1.3
Am using ANT build.

Please provide any additional information below.

After successful build/installation of my test apk in device. 

part of the log:

Caused by: java.lang.NoSuchMethodError: No static method 
anyOf([Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; in class 
Lorg/hamcrest/Matchers; or its super classes (declaration of 
'org.hamcrest.Matchers' appears in /data/app/com.foo.bar.test-2/base.apk)

I have verified my dex having Matchers.anyof(Matcher[]) method. Also verified 
there is no proguard running on test project build.

Is harcrest & espresso versions are incompatible?

Original issue reported on code.google.com by mahendra...@impigertech.com on 22 Jan 2015 at 2:09

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions