I got this error while running my test:
**No static field NO_OP_CONTROLLED_LOOPER of type**
Even when the test is empty with just check() function like this:
check(matches(isDisplayed()));
I searched but I could not find anything about it, so after I solved my problem I decided to share here for others. I was using these two versions:
// Espresso
def androidx_test_espresso = "3.2.0"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_test_espresso"
// androidx.test
def androidx_test = "1.2.0"
androidTestImplementation "androidx.test:runner:$androidx_test"
androidTestImplementation "androidx.test:core:$androidx_test"
androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_test"
I could overcome this problem by changing the versions to:
def androidx_test_espresso = "3.1.0"
def androidx_test = "1.1.0"
Maybe the versions above are not matched.
I hope this topic help you guys :)