Appium Driver Swipe method is throwing error

public static boolean swipe_Right_To_Left() {
Dimension size = getDriver().manage().window().getSize();
int startx = (int) (size.width * 0.8);
int endx = (int) (size.width * 0.20);
int starty = size.height / 2;
try {
} catch (InterruptedException e) {

	return true;

The method swipe(int, int, int, int, int) is undefined for the type
AppiumDriver is the error that I am seeing.

Can someone please help me with this

Try out ways mentioned in with latest versions appium server and java client

Thank you Vikram Hope this helps

Hi Vikram, I tried this touchAction technique but it gives error to .press method.Please give me suggestions if any. Thank you