integrating org.apache.poi and the javax.xml.stream.* package (stax-api) in android - how to set the --core-library argument in Android Studio?

前端 未结 2 918
野性不改
野性不改 2020-12-31 02:35

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 l

2条回答
  •  孤城傲影
    2020-12-31 02:47

    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:

    • https://github.com/andruhon/android5xlsx
    • https://github.com/centic9/poi-on-android/ (which I maintain)

    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.

提交回复
热议问题