4

I have been coding a web scraping application on Android, using HtmlUnit. But, when I build the app, the build error occur "Conversion to Dalvik format failed with error 1". So, how do I build the android app using HtmlUnit? please...

karasu
  • 43
  • 1
  • 4

1 Answers1

3

I just ran into this, and saw a lot of other errors triggered by XML-related jars, including this:

[2011-05-20 12:57:50 - Android Hello] Dx 
trouble processing "javax/xml/XMLConstants.class":

Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.

This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.

The problem went away after I removed the xalan, xercesImpl and xml-apis jars from the project (I usually include them with any projects using HtmlUnit on the desktop). Presumably they are colliding with the versions included in the SDK.

Rodney Gitzel
  • 2,652
  • 16
  • 23