Android Duplicate Class Error When Including Apache Poi
Solution 1:
Please note that there are a number of problems that you might run into when using Apache POI on Android. The duplicate classes in XmlBeans can currently only be avoided by re-packaging the jar.
There are currently two projects which try to solve most of the problems for you, both re-package all classes including any dependencies into a single jar-file to make it easier to deploy. Also some shading is done to avoid problems with javax-namespace which Android does not allow.
The first one is currently based on POI 3.12, whereas the second can be re-compiled with newer versions of POI more easily.
Solution 2:
The xmlbeans 2.6 JAR from Maven Central contains some duplicate class entries. The XMLBeans JIRA has an issue open for the problem. Until they publish a new JAR, I think I'm going to unzip the jar, which will overwrite the duplicates, then re-zip it up and put it in my libs dir for now.
Post a Comment for "Android Duplicate Class Error When Including Apache Poi"