There are many posts about reading .docx files with Apache POI on Android. I write Java program, which do it and want move it Android platform. But XWPFDocument requires xmlbeans.jar, and xmlbeans.jar requires stax-api.jar. And Stax API can not be added to android app, because it tries to extends javax.* namespace, which is not allowed.
So question is: how can I satisfy dependencies for Apache POI on Android?
There are now at least two projects which try to solve most of the problems when using Apache POI on Android. Only some methods when handling images will still fail because Apache POI uses stuff form java.awt which Android does not have.
Take a look at
The first one is currently based on POI 3.12, whereas the second can be re-compiled with newer versions of POI more easily.
Long investigation shown, it is not possible to use Apache POI on Android platform for editing .docx files.
来源:https://stackoverflow.com/questions/24442758/how-to-satisfy-dependencies-for-apache-poi-on-android