I`m getting
android.support.test.espresso.PerformException: Error performing \'send keyCode: 4, metaState: 0 key event\' on view \'Animations or tra
In my case, Espresso gave me the "Animations or transitions are not enabled..." error, but that wasn't actually the root cause.
Scrolling through the stack trace I found this:
androidx.test.espresso.PerformException: Error performing 'scroll to' on view 'Animations or transitions are enabled on the target device.
...
Caused by: java.lang.RuntimeException:
Action will not be performed because the target view does not match one or more
of the following constraints:
(view has effective visibility=VISIBLE and is descendant of a: (
is assignable from class: class android.widget.ScrollView or
is assignable from class: class android.widget.HorizontalScrollView or
is assignable from class: class android.widget.ListView
))
Target view: "LinearLayout{...}"
That is, I was trying to scroll something that can't be scrolled.
So, always read through the stacktrace folks