如何满足Android上Apache POI的依赖关系? [英] How to satisfy dependencies for Apache POI on Android?

查看:242
本文介绍了如何满足Android上Apache POI的依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于在Android上使用Apache POI读取.docx文件的文章很多.我编写Java程序来实现,并希望将其移动到Android平台.但是XWPFDocument需要xmlbeans.jar,而xmlbeans.jar需要stax-api.jar.而且 Stax API无法添加到Android应用,因为它试图扩展javax.*名称空间,这是不允许的.

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.

问题是:如何满足Android上Apache POI的依赖关系?

So question is: how can I satisfy dependencies for Apache POI on Android?

推荐答案

现在至少有两个项目试图解决在Android上使用Apache POI时遇到的大多数问题.仅某些处理图像的方法仍然会失败,因为Apache POI使用Android所没有的东西形式的java.awt.

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.

看看

  1. https://github.com/andruhon/android5xlsx
  2. https://github.com/centic9/poi-on-android/(由我维护)
  1. https://github.com/andruhon/android5xlsx
  2. https://github.com/centic9/poi-on-android/ (mainted by me)

第一个目前基于POI 3.12,而第二个可以更容易地与更新版本的POI重新编译.

The first one is currently based on POI 3.12, whereas the second can be re-compiled with newer versions of POI more easily.

这篇关于如何满足Android上Apache POI的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆