Apache OpenNLP在Java应用程序中有效,但在Android中出现IllegalStateException和ParserConfigurationException

我正在尝试在Android中使用OpenNLP(opennlp-tools-1.9.2.jar),但是我的应用程序始终在下面突出显示的XmlUtil类中抛出ParserConfigurationException,但是在Java应用程序中同样起作用,而没有任何问题。

documentBuilderFactory.setfeature(“ http://javax.xml.XMLConstants/feature/secure-processing”,true);

我已经尝试了以下链接中提供的解决方案,但是没有运气,有什么技巧可以解决此错误?谢谢。

OpenNLP: documentBuilderFactory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing",true) ParserConfigurationException

How to resolve IllegalStateException and ParserConfigurationException for finding location in android studio by using apache OpenNLP

xuzhihua131792 回答:Apache OpenNLP在Java应用程序中有效,但在Android中出现IllegalStateException和ParserConfigurationException

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2620399.html

大家都在问