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.

4
  • Can you provide your project's libraries? Commented Jan 6, 2016 at 23:51
  • I have included poi-3.13-20150929.jar,poi-ooxml-3.13-20150929.jar,poi-ooxml-schemas-3.13-20150929.jar,xmlbeans-2.6.0.jar Commented Jan 7, 2016 at 0:03
  • What happens if you try with POI 3.14 beta 1? Commented Jan 7, 2016 at 11:47
  • the same thing happens I get the same error Commented Jan 9, 2016 at 14:56

2 Answers 2

5

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

Sign up to request clarification or add additional context in comments.

Comments

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:

1 Comment

Another library which works fine for me: POI-Android - github.com/SUPERCILEX/poi-android Important: to get POI-Android running, it was important to set the Fasterxml Impls, as described here: github.com/ozlerhakan/poiji/issues/31

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.