Skip to content Skip to sidebar Skip to footer

Integrating Org.apache.poi And The Javax.xml.stream.* Package (stax-api) In Android - How To Set The --core-library Argument In Android Studio?

I'm using Android studio 1.5.1 I'd like to include the org.apache.poi-ooxml library in my android project. To include that library I needed to include some other library dependenci

Solution 1:

There are a number of problems when you try to use Apache POI and it's depending libraries in an Android Application. Among others there are duplicate classes in xmlbeans.jar, the "javax.*" packages are prohibited by the Android compiler and a few others.

There are currently two projects which try to fix those issues:

android5xlsx provides ready-made jar-files to include in your application, but currently uses a somewhat outdated version of POI. poi-on-android is based on POI 3.15-beta1 and can be recompiled for newer versions of POI fairly easily. Both projects are for Android 5+ and come with sample code and should allow basic usage of Apache POI on Android.

Solution 2:

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

Post a Comment for "Integrating Org.apache.poi And The Javax.xml.stream.* Package (stax-api) In Android - How To Set The --core-library Argument In Android Studio?"