Unable to scroll/swipe down for Android native app

Dimension size = driver.manage().window().getSize();
int anchor = (int) (size.width * 0.5);
int startPoint = (int) (size.height * 0.1);
int endPoint = (int) (size.height * 0.9);
new TouchAction(driver).press(anchor, startPoint).waitAction(Duration.ofMillis(3000)).moveTo(anchor, endPoint).release().perform();

shows error in press like ;’’ Multiple markers at this line
- The method press(PointOption) in the type TouchAction is not applicable for the arguments
(int, int)
- TouchAction is a raw type. References to generic type TouchAction should be

using static AppiumDriver driver;

tried lot of code from google, nothing is works for me. please guide me. Thanks in Advance.