问题
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.
回答1:
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:
- https://github.com/andruhon/android5xlsx (for Android 5) and https://github.com/andruhon/AndroidReadXLSX (for Android 4), both are currently still based on Apache POI 3.12
- https://github.com/centic9/poi-on-android/ (for Android 5, maintained by me), which can be more easily recompiled with newer versions of POI, e.g. it uses 3.17 currently
来源:https://stackoverflow.com/questions/34644528/noclassdeffounderror-failed-resolution-of-ljavax-xml-stream-xmleventfactory-wi