I am unable to run the unit test when I import org.hamcrest.Matchers
as I need lessThan()
. My instrumentation tests compile properly while using the greaterThan
matcher but not the unit tests
Code:
import org.hamcrest.CoreMatchers.*
import org.hamcrest.Matchers.lessThan
import org.junit.Assert.assertThat
import org.junit.Test
import java.util.*
Gradle Logs: https://pastebin.com/ibgzzrg1
Removing the 2nd line makes the project compile and runs the test.
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
but the error still exist – Vaginal