HtmlUnit on Android

后端 未结 1 669
情书的邮戳
情书的邮戳 2020-12-10 09:09

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\

相关标签:
1条回答
  • 2020-12-10 09:42

    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.

    0 讨论(0)
提交回复
热议问题