Configure Project In Eclipse For Appium

Earlier we learnt how to setup environment in windows for run appium automation project, SDK installation, usage of tools like UI Automator Viewer to locate android app elements etc. Now everything is ready and we are just step away from running appium test in android device. Before that we need to create project in eclipse so let's configure project in eclipse for appium. Bellow given steps will tell you how to setup appium project. I hope most of you already knows all these things but still let me describe you how to configure first appium project in eclipse.

PREREQUISITE : All previous 11 STEPS should be completed without any error.

Create New Project In Eclipse

Before creating new project In eclipse, You must be aware about how to download Eclipse IDE, How to create workspace for project, Creating new project and package In eclipse and adding jar files In your project's build path. I have already described all these thing In THIS POST so I will not repeat It here.
  • Start Eclipse IDE. It will ask you to set workspace If you are using It first time.
  • Set workspace.
  • Create new project(With your desired name. For me It Is MavenProject1) In eclipse with package name Android.
  • Install TestNG : I hope testng is already installed in your eclipse. View THIS POST to know how to install testng in eclipse.
Not using maven?
If you are not using maven with eclipse then follow bellow given steps in eclipse.

Download Latest Jars of WebDriver and Appium Client Libraries
We need to add latest version jar files of selenium webdriver and Appium Client Libraries in our project's build path.
  • You can download jar files for selenium webdriver from THIS PAGE. View THIS POST for more detail.
  • You can download latest version of appium client libraries(java-client-x.x.x.jar where x.x.x is current latest version of jar) from THIS PAGE. Click on Java link, It will take you on jar file download page.

  • Then click on jar link as shown bellow. It will start downloading appium client libraries jar file.
Download Latest Jar File Of google-gson
You also need google-gson's latest jar file. Current latest version Is 2.3.1. You will find google-gson download link on THIS PAGE.

Add jar files in project's build path
Now we have selenium webdriver, appium client libraries and gson jar files.

HERE you can learn how to add jar files in project's build path
  • Add selenium webdriver jar files in project's build path.
  • Add java-client-x.x.x.jar in project's build path.
  • Add gson-x.x.x.jar in project's build path.
That's it..

Using maven?
If you are using maven project management tool with eclipse then no need to add above jar files in project's build path but you have to add Selenium WebDriver, Appium Java Client Libraries and gson dependencies in pom.xml file.
  • Visit THIS PAGE to find selenium webdriver dependency.
  • Visit THIS PAGE to find Appium Java Client Libraries dependency.
  • Visit THIS PAGE to find gson dependency.
Current latest dependencies for selenium, appium java client and gson  are as bellow. It may change in future so update accordingly.


This is all about appium project configuration in eclipse for maven and non maven users.


  1. hi, Aravind
    my eclipse gave me an alert "Error when loading the SDK", inside said things wrong in the android wear in android-22, and android 23. I delete both of 22 and 23, but the problem caused by 23 still there.
    what should I do? I will keep trying. But please tell me the solution, If you know.



  2. Hi! Great article but I'm a little confused about the entire structure of the pom file. How and where exactly shall I add these dependencies in my pom file?

    1. Hi Pinaki,

      Add your dependencies inside !-- Add your dependencies here--
      For ex:

  3. May also need this dependency in maven (maybe this changed since you wrote this):


  4. getting the following error
    org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 974 milliseconds
    Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
    System info: host: 'Cerebtech', ip: '', 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_111'
    Driver info: org.openqa.selenium.remote.RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.lang.reflect.Constructor.newInstance(
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
    at org.openqa.selenium.remote.RemoteWebDriver.execute(
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(
    at org.openqa.selenium.remote.RemoteWebDriver.(
    at org.openqa.selenium.remote.RemoteWebDriver.(
    at Android.SimpleAndroidCalcTest.setUp(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.testng.internal.MethodInvocationHelper.invokeMethod(
    at org.testng.internal.Invoker.invokeConfigurationMethod(
    at org.testng.internal.Invoker.invokeConfigurations(
    at org.testng.internal.Invoker.invokeConfigurations(
    at org.testng.TestRunner.beforeRun(
    at org.testng.SuiteRunner.runTest(
    at org.testng.SuiteRunner.runSequentially(
    at org.testng.SuiteRunner.privateRun(
    at org.testng.SuiteRunnerWorker.runSuite(
    at org.testng.TestNG.runSuitesSequentially(
    at org.testng.TestNG.runSuitesLocally(
    at org.testng.remote.RemoteTestNG.initAndRun(
    at org.testng.remote.RemoteTestNG.main(