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...
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
由
翻译强力驱动
问题:
回答1:
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.
转载请标明出处:HtmlUnit on Android
文章来源: HtmlUnit on Android