AppiumDriver cannot be reolved as a type

Hi all,

I’m getting the error “AppiumDriver cannot be resolved to a type”, when I specify the below line:
driver = new AppiumDriver(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities);

I tried to create an object of AppiumDriver class like AppiumDriver driver, again I get the same error,
Kindly help in resolving this issue.

Regards
Tejesh

What version of Appium java client are you using??

Try using the below code:

		DesiredCapabilities capabilities = new DesiredCapabilities();
		capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
		capabilities.setCapability("platformName", "Android");
		capabilities.setCapability("deviceName","samsung-gt_i9100");
		capabilities.setCapability("platformVersion", "4.4.2");
		//capabilities.setCapability("app", app.getAbsolutePath());
		capabilities.setCapability("appPackage","com.whatsapp");
		capabilities.setCapability("appActivity","com.whatsapp.Main");
		AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);