Appium Error could not be resolved

I get following error in Eclipse while running Appium scripts for Android:
java.lang.NoSuchMethodError: org.openqa.selenium.remote.http.HttpClient$Factory.createDefault()Lorg/openqa/selenium/remote/http/HttpClient$Factory;

the code for the line where error occurs looks like this:
driver = new AndroidDriver(new URL(“”), cap);

I tried different jar versions for the libraries but with no success.

Can someone please help me out in this


AndroidDriver driver=new AndroidDriver<>(new URL(“”),cap);

driver = new AndroidDriver(new URL(“”), cap