My Pixel 4a was upgraded to Android 12 and now, when I try to run an Espresso test on that device, no tests run. Android Studio says "Tests Passed 0 passed". No tests ran. Tests still run as expected on an Android 11 device.
My test method is annotated with org.junit.Test. My test class is annotated with androidx.test.filters.LargeTest.
I made sure to upgrade Android Studio. I updated compileSdkVersion and targetSdkVersion to 31 in build.gradle. I checked my test dependencies and updated them to the following versions:
junit:junit:4.13.2
androidx.test.ext:junit-ktx:1.1.3
androidx.test:runner:1.4.0
androidx.test:rules:1.4.0
androidx.test.uiautomator:uiautomator:2.2.0
androidx.test.espresso:espresso-core:3.4.0
androidx.work:work-testing:2.7.0
After all these changes, the problem is still there, and I've also seen it on AVDs.
Has anybody else experienced this issue?