我想解析HTML頁面基於JavaScript和內容加載時,當我點擊按鈕和JavaScript工作。我使用libs Jsoup,Selenium在Java上的PC上創建我的應用程序。我希望它能在android上運行。我加硒新我的Android應用程序的項目,並添加依賴於gradle這個:Selenium into android project
compile 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.48.2'
但是我看到很多相同的信息:
Warning:Dependency org.apache.httpcomponents:httpclient:4.5.1 is
ignored for debug as it may be conflicting with the internal version
provided by Android. In case of problem, please repackage it with
jarjar to change the class packages
後,我嘗試添加的HttpClient爲Android:
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
但它不起作用。有1個錯誤:
Error:Execution failed for task ':app:preDexDebug'. >
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command 'C:\Program
Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 1
如何將Selenium包含在android項目中用於解析基於Javascript的HTML? 或 如何在沒有Selenium的情況下解析基於JS的HTML基礎? 謝謝。
[git hub上的鏈接](https://github.com/iamsimakov/HtmlUnitApp) – Alexey