7

I have been trying to write excel sheets to external storage using apache poi library on android but every time I run the app I am getting the error

Failed resolution of :Ljavax/XML/stream/XMLEventFactory

I have read the official documentation for poi and searched Google but in vain. Also I use jdk1.8 but still the error occurs.

Gagravarr
  • 47,320
  • 10
  • 111
  • 156
deshmanth
  • 529
  • 5
  • 12

2 Answers2

4

Currently Apache POI will not work on Android out of the box due to various problems that you will encounter when using the libraries from Apache POI directly.

There are two projects that try to make it possible to use Apache POI on Android:

centic
  • 15,565
  • 9
  • 68
  • 125
  • Another library which works fine for me: 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 – Christoph Bimminger Jan 05 '20 at 22:40
4

Add implementation 'javax.xml.stream:stax-api:1.0' in you app build.gradle, as some core class missed

Sonu Sourav
  • 2,926
  • 2
  • 12
  • 25