首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Apache读取android中的MS 2010文件

使用Apache读取android中的MS 2010文件
EN

Stack Overflow用户
提问于 2013-11-26 17:34:48
回答 2查看 930关注 0票数 3

我在我的android应用程序中使用阿帕奇POI读取存储在SDCARD中的xlsx文件。我正在使用来自Apache的以下jar库

  1. poi-ooxml-schemas-3.9-20121203.jar
  2. poi-ooxml-3.9-20121203.jar

但是当我尝试运行Android时,我会看到下面提到的堆栈跟踪。

代码语言:javascript
复制
trouble writing output: Too many methods: 66024; max is 65536. By package:
    13 java.lang
     1 java.lang.reflect
     5 java.util
     1 javax.xml.namespace
    66 org.apache.xmlbeans
    19 org.apache.xmlbeans.impl.values
     1 org.apache.xmlbeans.impl.xb.xmlschema
  2500 org.openxmlformats.schemas.drawingml.x2006.chart
  1430 org.openxmlformats.schemas.drawingml.x2006.chart.impl
  8767 org.openxmlformats.schemas.drawingml.x2006.main
  5258 org.openxmlformats.schemas.drawingml.x2006.main.impl
    86 org.openxmlformats.schemas.drawingml.x2006.picture
    33 org.openxmlformats.schemas.drawingml.x2006.picture.impl
   745 org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing
   417 org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.impl
   230 org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing
   164 org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.impl
   298 org.openxmlformats.schemas.officeDocument.x2006.customProperties
   256 org.openxmlformats.schemas.officeDocument.x2006.customProperties.impl
   617 org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes
   596 org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.impl
   285 org.openxmlformats.schemas.officeDocument.x2006.extendedProperties
   196 org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.impl
    23 org.openxmlformats.schemas.officeDocument.x2006.math
    24 org.openxmlformats.schemas.officeDocument.x2006.relationships
     2 org.openxmlformats.schemas.officeDocument.x2006.relationships.impl
  2076 org.openxmlformats.schemas.presentationml.x2006.main
  1224 org.openxmlformats.schemas.presentationml.x2006.main.impl
     1 org.openxmlformats.schemas.schemaLibrary.x2006.main
  7271 org.openxmlformats.schemas.spreadsheetml.x2006.main
  4556 org.openxmlformats.schemas.spreadsheetml.x2006.main.impl
 11448 org.openxmlformats.schemas.wordprocessingml.x2006.main
  9217 org.openxmlformats.schemas.wordprocessingml.x2006.main.impl
     4 schemaorg_apache_xmlbeans.system.sE130CAA0A01A7CDE5A2B4FEB8B311707
  1170 schemasMicrosoftComOfficeExcel
  1223 schemasMicrosoftComOfficeExcel.impl
   285 schemasMicrosoftComOfficeOffice
   124 schemasMicrosoftComOfficeOffice.impl
     2 schemasMicrosoftComOfficePowerpoint
     3 schemasMicrosoftComOfficeWord
  2858 schemasMicrosoftComVml
  2529 schemasMicrosoftComVml.impl
[2013-11-25 21:20:32 - CRD] Conversion to Dalvik format failed with error 2

有人能说出我失踪的地方吗?

EN

回答 2

Stack Overflow用户

发布于 2014-04-28 14:35:16

如果您对任何android应用程序使用过多的代码,编译就会抛出这个错误。提出并解决了类似的这里问题。你应该把这个应用分成几个部分,作为一个插件,以一个单独的APK的形式下载。APK将公开主应用程序将使用的一些组件。谷歌的游戏中有各种各样的应用程序。

票数 1
EN

Stack Overflow用户

发布于 2016-08-16 13:57:19

请注意,在Android上使用Apache时存在许多问题。你点击的那个可以通过新版本的安卓中所谓的"multiDex“功能来解决。

目前有两个项目试图为您解决大部分问题:

  1. https://github.com/andruhon/android5xlsx
  2. https://github.com/centic9/poi-on-android/ (由我主讲)

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20224083

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档