Skip to content

Unresolved hamcrest Matchers when updating espresso to v3.4.0 #1352

Open
@sohail77

Description

@sohail77

Description

After updating my espresso dependency from v3.3.0 to v3.4.0 my project complains that it can't find hamcrest Matchers.
I'm using the following espresso dependencies:

            private const val version = "3.4.0"
            const val core = "androidx.test.espresso:espresso-core:$version"
            const val contrib = "androidx.test.espresso:espresso-contrib:$version"
            const val intents = "androidx.test.espresso:espresso-intents:$version"
            const val accessibility = "androidx.test.espresso:espresso-accessibility:$version"
            const val web = "androidx.test.espresso:espresso-web:$version"

And I'm adding these in my project using androidTestImplementation

Expected Results

The test compiles and I can run instrumentation tests

Actual Results

I get a bunch of Unresolved reference errors

Unresolved reference: equalTo
Unresolved reference: Matchers
Unresolved reference: allOf
Unresolved reference: is
.
.
.

The same configuration works fine if I use v3.3.0

It also works if I explicitly add org.hamcrest:hamcrest:2.2 dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions