The type javax.xml.stream.XMLStreamReader cannot be resolved

后端 未结 2 404
情歌与酒
情歌与酒 2021-01-22 08:23

The type javax.xml.stream.XMLStreamReader cannot be resolved. It is indirectly referenced from required .class files.Im getting this error in a line.Which jar am i missing?

相关标签:
2条回答
  • 2021-01-22 09:09

    javax.xml.stream.XMLStreamReader is available on Java SE 6 and higher: not on the Android platform. You must be using a library that depends on that class, but it isn't a standard part of the platform. https://www.findjar.com/class/javax/xml/stream/XMLStreamReader.html has a list of jar files that may have it, but no guarantees you'll be able to successfully incorporate them.

    0 讨论(0)
  • 2021-01-22 09:16

    I came over exactly same topic when trying to get Apache POI running on Android. Also the Apache Poi is using XmlStreamReader. The info described on the docx4java link is a valuable collection of pain points, but in the end it may be a complex task to recompile the full library.

    For Apache POI, I found the POI-Android library which already did this job and made POI compatible with android (unfortunately the old POI 3.17, but works fine in my case).

    POI-Android: https://github.com/SUPERCILEX/poi-android

    Important: to get POI-Android running, it was important to set the Fasterxml Impls, as described here: https://github.com/ozlerhakan/poiji/issues/31

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