Intellij throws compilation error that Touch Action cannot be Applied to Android driver

TouchAction touchAction =new TouchAction(driver);
Intellij throws compilation error that Touch Action cannot be Applied to Android driver. How are we supposed to swipe anyone faced this issue?

I am using Appium 1.8.3 and java client 6.0.0-BETA4 and creating touchAction Object using Android driver, however I see the compilation error with Appium driver also

Ignore this topic, I had imported the wrong TouchAction.

btw the right one is import io.appium.java_client.TouchAction;