I was following the espresso guide by raywenderlich, and it works well on Pixel 4:
$ ./gradlew connectedAndroidTest Starting a Gradle Daemon, 1 incompatible