Scroll horizontal code not working

environment :
windows 10
appium 1.20
android real device v 10

 driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true)."
                + "resourceId(\"" + id + "\"))"
                + ".setAsHorizontalList().scrollIntoView(new UiSelector().textContains(\"" + text + "\"))"); 

this command was working fine till date but now it’s not working.