(Android development tips series) Create public components and call components in new applications

Source: Internet
Author: User
Tags dot net

Preface:

During Android development, public functions are encapsulated into components for subsequent application development. The following describes how to package components in Eclipse and use them in other applications.


(If you are engaged in java development, it will float. If you were using dot net development before
Let's stay for a while.
)

Java
Summary of encapsulated components:

Before you describe the java encapsulated components, first describe the dot net
How to encapsulate components. Before encapsulating a public component, create a project and compile and generate a dll file for the project. Other applications are in the project creation process, add other components to load public components.

In Java, every class will generate a class file after compilation. We need to reuse a group of class files. How can we package these files together? This is a jar file, jar files are a collection of class files.

After the jar file is generated, third-party applications can reference third-party components.

JavaEncapsulate Components

Step one: select the project to be encapsulated, right-click the project, and select the Export item.

Step Two click the Export entry to bring up the Export page.

Step Three: Create component information (including selection class and generation position)

Java application encapsulated Components

Step One select the project root directory,Right-click the menu item and select the attribute item at the bottom.

Step Two select java Build path ---> libraries ---> Add External JARS to Add third-party components on the property configuration page.

 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.