在我开发是导入了两个jar包htmllexer.jar和htmlparser.jar,他们中存在相同的类,导致报错
报错信息:
[2014-10-22 11:42:36 - VoaLearning] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.htmlparser.util.NodeList$1) that doesn't come with anassociated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
[2014-10-22 11:42:36 - VoaLearning] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.htmlparser.beans.BeanyBaby$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
[2014-10-22 11:42:39 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/htmlparser/util/SimpleNodeIterator;
[2014-10-22 11:42:39 - VoaLearning] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/htmlparser/util/SimpleNodeIterator;
分析:两个包有相同的类htmlparser/util/SimpleNodeIterator
解决方法:删除其中一个包的类;
(zip软件查看jar包,直接把htmlparser下面的util中的SimpleNodeIterator.class文件给删除了,然后再导入到eclipse中。)
本文介绍了在导入两个含有相同类名的jar包时遇到的编译错误及警告,并提供了解决方案,即手动删除其中一个jar包内的冲突类。
3135

被折叠的 条评论
为什么被折叠?



