Getting Exception NoClassDefFoundError in Appium
<p>Getting Exception <strong>java.lang.NoClassDefFoundError: org/openqa/selenium/HasTouchScreen</strong> in Appium while clicking on an Element. I have used <strong>three locators(text,id,partialLinkText)</strong> in my code same Task but still getting the Same Exception Every time. PFB the App DOM Screenshot, code,Exception,jarfile version</p>

<ol>
<li>selenium-android-driver.jar</li>
<li>java-client-4.1.2 (1).jar</li>
<li>selenium-server-standalone-3.0.1.jar</li>
</ol>

<p>I am trying to click on Text "Sign in Or" so i can automate the signin Module. But I got stuck in First Step only :(</p>

<p><a href="https://i.stack.imgur.com/tjpa8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tjpa8.png" alt="enter image description here"></a></p>

<p><strong>Code</strong></p>

<pre><code>import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.android.AndroidDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

public class searsLogin {
    AndroidDriver driver;
  @BeforeTest
  public void setup() throws MalformedURLException {
      DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("deviceName", "ccdcb242");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "ANDROID");
        capabilities.setCapability(CapabilityType.VERSION, "5.1.1");
        capabilities.setCapability("platformName", "Android");
          capabilities.setCapability("appPackage", "com.sears.android");
            capabilities.setCapability("appActivity", "com.android.sears.activity.MenuDrawerActivity");
             driver = (AndroidDriver) new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
           driver.manage().timeouts().implicitlyWait(45, TimeUnit.SECONDS);
  }
    @Test
  void execution()
  {
        // driver.findElementByName("Sign in or").click();/// contains method
 // boolean res = driver.findElement(By.name("Sign in or")).isDisplayed();  
//boolean res =  driver.findElement(By.xpath("//*[contains(text(),'Sign in or')]")).isDisplayed();
  driver.findElement(By.partialLinkText("Sign in or")).click(); 
     }
   @AfterTest
  public void end()
  {
      driver.quit();
  }  }
</code></pre>

<p><strong>Exception Message</strong></p>

<pre><code>java.lang.NoClassDefFoundError: org/openqa/selenium/HasTouchScreen
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
</code></pre>