appium / appium/java-client

getting error message when trying to install an app in adroid studios trought appium server.

Open
#1,521 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

The problem

getting error message when trying to install an app in android studios trought Appium server.

Environment

Used Tools : Selenium, Android studios, JAva version 11, appium 1.22.

Error message***************


error message:
Exception in thread "main" java.lang.NoSuchMethodError: 'org.openqa.selenium.remote.http.HttpClient$Factory org.openqa.selenium.remote.http.HttpClient$Factory.createDefault()'
at io.appium.java_client.remote.AppiumCommandExecutor.(AppiumCommandExecutor.java:93)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:95)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:94)
at tutorial.TwelvePer.main(mdev.java:30)

Code:**************************


package tutorial;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;

public class mdev{

public static void main(String[] args) throws MalformedURLException {
	
	File appDir = new File("src");
	File app = new File(appDir, "mdev.apk");

	DesiredCapabilities cap = new DesiredCapabilities();
	
	cap.setCapability(MobileCapabilityType.DEVICE_NAME, "anilemulator");
	
	cap.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiautomator2");
	
	cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
	
	AndroidDriver<AndroidElement> driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"),cap);

}

}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace at AppiumCommandExecutor.java:93 and the reported Java, Selenium, Android Studio, and Appium versions. Reproduce construction of AndroidDriver in mdev.java, then verify the dependency combination that allows the application to start without the reported NoSuchMethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.