HtmlUnit on Android

匿名 (未验证) 提交于 2019-12-03 01:28:01

问题:

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
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!