'Unable to determine element locating strategy for -android uiautomator

I have a method which works perfectly on locally, but when I launch it on server I've got an error:

org.openqa.selenium.InvalidArgumentException: Unable to determine element locating strategy for -android uiautomator

Method is scrolling view till element with text I need:

public void tapOnElementByIdAndText(String resourceId, String visibleText) {
        driver.findElementByAndroidUIAutomator(
                "new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"" + resourceId + "\").text(\"" + visibleText + "\").instance(0))").click();
        hideKeyboard();
    }

How can I make it work or any other smooth solution for scrolling screen?


Solution 1:[1]

GRID 4 cant work with customa locatorn and UIselector, downgrade to GRID 3 or work directly with devices

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 J.Klimov