本文介绍了错误而导入的jar到Android项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

下面的错误我得到的,而把阿帕奇的xerces.jar在构建路径。

我已搜查前的错误..和描述的解决方案是为冲突的罐子..但心不是这里的情况..我收到由于一些ParserException一个糟糕的UTF-8

我曾尝试(但没有运气):

  • 清洁项目
  • 重新启动日食
  • 更新ADT,SDK
  • 删除所有库和固定凸出的属性,然后导入Xerces的解决冲突
  • 在加上我只是只有1个外部LIB的Xerces

这是在here

删除的Xerces运行该凸出

几个月前,我曾通常通过构建路径进口Xerces和它的工作。任何帮助AP preciated!

解决方案

在你的问题,你提到:

这引发了红旗对于我来说,因为月很可能会成为一辈子当谈到那些不断更新的库。也许你的问题是不是与Eclipse中的jar文件的兼容性,而是一个问题的jar文件本身,这可能与坏的UTF-8字节解释你的分析器错误。

据阿帕奇( http://xerces.apache.org/xerces2-j/的Install.html ),事实证明,的xerces.jar 现在去precated:

所以,上面列出的同一页上,我发现,你只需要使用两个新的文件替换的xerces.jar: xercesImpl.jar XML-apis.jar 。见下面摘录(从与上述相同的链接):

如果你仍然想/需要使用的xerces.jar,阿帕奇提供了一个途径向后兼容性

链接上面继续列出你可以使用的版本问题,遇到更多的潜在问题。让我知道如果这能解决你的问题;如果没有,我会继续寻找可能的解决方案。

Below error i get while putting apache xerces.jar in build path ..

I have searched before for the error .. and solutions described were for conflicting jars .. but that isnt the case here .. i am getting some ParserException due a bad utf-8

I have tried (but with no luck):

  • cleaning the project
  • restarting eclipse
  • updating adt, sdk
  • removing all libs and fixing proj properties and then importingxerces to resolve conflicts
  • plus i just have only 1 external lib xerces

from solutions at here

removing xerces runs the proj

Few months ago i had imported xerces normally via build path and it had worked.Any help appreciated!

解决方案

In your question, you mention:

This raised the red flag for me, since "months" might as well be a lifetime when it comes to libraries that are constantly being updated. Perhaps your issue is not with the jar file compatibility with Eclipse, but rather, an issue with the jar file itself, which could explain your parser error with the "bad UTF-8 byte".

According to Apache (http://xerces.apache.org/xerces2-j/install.html), turns out that xerces.jar is now deprecated:

So, on the same page as listed above, I found that you just have to replace xerces.jar with two new files: xercesImpl.jar and xml-apis.jar. See excerpt below (from same link as above):

If you still want/need to use xerces.jar, Apache has provided a way for backwards compatibility:

The link above continues to list more potential problems you could encounter with version issues. Let me know if this solves your issue; if not, I'll continue to look for potential solutions.

这篇关于错误而导入的jar到Android项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 15:55