title: Cannot instantiate the type AppiumDriver
body: <p>I have added following jars in my projects build path:</p>
  
  <ol>
  <li>java-client-2.0.0 from <a href="http://appium.io/downloads.html" rel="nofollow noreferrer">http://appium.io/downloads.html</a> >> Appium Client libraries >> Java</li>
  <li>selenium-java-2.43.1</li>
  <li>selenium-java-2.43.1-srcs</li>
  <li><p>selenium-server-standalone-2.43.1<br>
  and here's my code:</p>
  
  <pre><code>public class SampleApp{
  
  WebDriver dr;
  
  @Test
  public void testApp() throws MalformedURLException, InterruptedException {
      String apkpath = "D:\\apkdump\\sampleapp.apk";
      File app = new File (apkpath);
      DesiredCapabilities capabilities= new DesiredCapabilities();
      capabilities.setCapability(CapabilityType.BROWSER_NAME,"");
      capabilities.setCapability("deviceName","TestADB18");
      capabilities.setCapability("platformName","Android");
      capabilities.setCapability("app",app.getAbsolutePath());
      capabilities.setCapability("appPackage", "com.test");
      capabilities.setCapability("appActivity", "com.sampleapp.Main");
      dr = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
      dr.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
  
  }
  
  
  }
  </code></pre>
  
  <p>I am getting red line below <code>new AppiumDriver</code> which says that <code>Cannot instantiate the type AppiumDriver</code>. Now if remove all <code>selenium jars</code> the error disappears but then I can't resolve errors with webdriver.<p><strong>What is the conflict between jars?</strong> <p>
  I saw similar question <a href="https://stackoverflow.com/questions/24769181/appiumdriver-gives-null-pointer-exception">here</a> but that could run the code and was getting <code>Null pointer exception</code> but in my case I cant even run it, it is giving run on saving the code. Secondly the <strong>answer has been posted without using</strong> <code>AppiumDriver</code></p></li>
  </ol>