0

I am trying to perform a click activity on a web page and get the response using HtmlUnit in Android. (I don't want user to be knowing this activity. So, I am trying to use HtmlUnit or Selenium). So, I tried initially to to use WebClient present in html unit. But when I try to run the app, I get an error :

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_20\bin\java.exe'' finished with non-zero exit value 1

Please share your ideas to resolve the issue.

Sample Code :

final WebClient webClient=new WebClient(); final HtmlPage page=webClient.getPage("http://www.google.com");

poovannan
  • 21
  • 1
  • 1
  • 6

1 Answers1

0

Just clean project and rebuild project.

If still error try this in your build.gradle(Module: app).

android {
    ...
    defaultConfig {
        ...
        multiDexEnabled true
    }
}
aiueoH
  • 728
  • 1
  • 8
  • 24