Selendroid Android Studio: нет статического поля INSTANCE типа Lorg / apache / http / message / BasicLineFormatter - PullRequest
0 голосов
/ 03 ноября 2018

Я просто провожу простой тест с WebDriver с использованием Selendroid в Android Studio. Я столкнулся с этой ошибкой:

java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/message/BasicLineFormatter; in class Lorg/apache/http/message/BasicLineFormatter; or its superclasses (declaration of 'org.apache.http.message.BasicLineFormatter' appears in /system/framework/org.apache.http.legacy.boot.jar)

Вот что у меня есть:

public class MainActivity extends AppCompatActivity {

private TextView textView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    textView = (TextView) findViewById(R.id.tv);

    WebDriver driver = new RemoteWebDriver(DesiredCapabilities.android());

    driver.get("http://m.ebay.de");

    // Find the text input element by its id
    WebElement element = driver.findElement(By.id("kw"));

    // Enter something to search for
    element.sendKeys("Nexus 5");

    // Now submit the form. WebDriver will find the form for us from the element
    element.submit();

    textView.setText(driver.getTitle());

    // Check the title of the page

    driver.quit();
}
}

Пожалуйста, помогите мне.

...