NoClassDefFoundError: Failed resolution of :Ljavax/XML/stream/XMLEventFactory with Apache POI on Android

假如想象 提交于 2019-12-18 05:02:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!