[Abstract] How does android ProgramCompress it into a jar package and export it
1. Create a Java Project
2. Add Android. jar to Java build path> libraries.
3. In package explorer, right-click the project and choose export Java-> JAR file.
Use
1. Create an android Project
2. Add the JAR file to the project property Java build path> libraries.
3. Use the jar class in the android project.
Shared only in jarCodeAnd cannot use resources.
--------------------------------------------------------------------------------
What if I encapsulate my code into a jar library for reuse by other programs?
First, create an android project and confirm that the project can be compiled,
Remove the androidmanifest. xml file and related program resource images.
In eclipse, find package explorer and select export,
In the export dialog box, select Java, JAR file,
In JAR File Specification, select the resources we need everywhere, and so on,
In JAR file: select the path where the exported files are stored,
Select compress the contents of the JAR file to compress the size of the generated file.
Click Next or finish to complete the export,
In this way, you can import this library into future projects, and the effect of code reuse is similar to that of DLL files developed by Windows 32.