且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android和XML解析器STAX-1.2.0.jar与使用源

更新时间:2023-11-13 17:22:28

我得到它的工作。下面是我所做的:

I got it to work. Here is what I did:


  1. 在Eclipse中创建一个新的Java项目,提取源$ C ​​$ C文件中的 stax-src-1.2.0.zip (由codehaus下载),并导入来源$ C ​​$ C到新的项目。

  1. Create a new Java project in Eclipse, extract the source code file stax-src-1.2.0.zip (downloaded from Codehaus), and import the source code into your new project.

重构所有javax.xxxxx文件夹。我补充说:东亚银行。在所有这些的面前,就像bea.javax.xml。确保没有源文件显示错误。我不得不打开其中之一,手动或改变其进口(按addeding东亚银行的话)。

Refactor all of the javax.xxxxx folders. I added "bea." in front of all of them, like "bea.javax.xml". Make sure none of the source files show an error. I had to open one of them and manually and change its import (by addeding "bea." to it).

右键单击src和选择Export ...。爪哇 - JAR文件,并点击下一步

Right-click on src and select Export... "Java - JAR File", and click next.

在选择的资源导出,选择这两个的.classpath 的.project 。然后选择这些选项:

In "Select the resources to export", select both .classpath and .project. Then have these options selected:


  • 导出生成的类文件和资源

  • 导出Java源文件和资源

  • 选择一个目的地。在Android项目的libs目录是它会去的。

  • 的COM preSS的JAR文件的内容

  • 添加目录条目

在JAR文件在Android项目的libs文件夹,你将能够使用。我并不需要将其添加到构建路径。

Once the JAR file is in the libs folder of the Android project, you will be able to use. I didn't need to add it to the build path.