2

再コンパイルの方法を教えてください

poi-ooxml-schemas.jar

だけで

11448 org.openxmlformats.schemas.wordprocessingml.x2006.main 9217 org.openxmlformats.schemas.wordprocessingml.x2006.main.impl

Android ADT バンドルでコンパイルしようとすると、このエラーが発生し続けます。

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-04-27 10:20:02 - TestProject] Conversion to Dalvik format failed with error 2

私は XWPF のみを使用しており、apache-poi から必要なクラスに縮小することができました。

しかし、私はまだ同じ「方法が多すぎる」に直面しています

  1. OOXML CT.. クラスのソースが見つからないようです。どこから来たのですか?

Apache POI での OOXML サポートは、XMLBeans を使用して Java にコンパイルされたファイル形式の XML スキーマの上に構築されています。現在、コンパイルは XMLBeans 2.3 で行われており、インストールとの互換性を最大限に高めています。(結果のクラスは、XMLBeans 2.3 ランタイム、またはそれ以降のバージョンの XMLBeans で使用できます。現在 XMLBeans 2.2 以前を使用している場合は、残念ながらアップグレードする必要がありますが、これはもはや一般的ではありません)。

すべての org.openxmlformats.schemas.spreadsheetml.x2006 CT... クラスは、XMLBeans によって自動生成されます。生成された Java は ooxml-schemas-src jar に入れられ、コンパイルされたバージョンは ooxml-schemas jar に入れられます。

完全な ooxml-schemas jar は、Apache POI とともに配布され、共通部分のみを含むカットダウンされた poi-ooxml-schemas jar とともに配布されます。通常、ソース jar は POI と共に配布されません。ただし、これは Maven Central から入手できます。お気に入りの Maven ミラーに ooxml-schemas-src jar を問い合わせてください。または、POI ソース配布物をダウンロード (または SVN からチェックアウト) してビルドすると、Ant は仕様の XML スキーマを自動的にダウンロードし、それをコンパイルして、ソースとバイナリの ooxml-schemas jar を生成します。

ApacheのWebサイトでは、上記のように書かれていますが、私はmavenやantが苦手です。xwpf に必要なクラスだけで poi-ooxml-schemas.jar を作成できるかどうか教えてください。

4

0 に答える 0