Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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?

like image 686
playmaker420 Avatar asked Sep 14 '26 12:09

playmaker420


2 Answers

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.

like image 152
Femi Avatar answered Sep 17 '26 13:09

Femi


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

like image 28
Christoph Bimminger Avatar answered Sep 17 '26 14:09

Christoph Bimminger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!