Android References Library project

Source: Internet
Author: User

1 , how to add a Android Engineering as a library project ( Library Project )

Library Project is as Jar Package by other Android The project is used, first of all it is also common Android Engineering. Then:

1 ) in Eclipse Package Explorer, Right-click Android Project Selection Properties

2 ) Select Android , pull the scroll bar to the bottom of the right, select " is Library "

3 ) Click Apply , click OK

this Android the project became Library Engineering.

2 , how the master project references the library project

when referencing Lib after the project, the main project can call Library related classes and methods of engineering. android project references other library Engineering steps:

1 ) in Package Explorer, Right-click android Project Select Properties

2 ) Select Android , pull the scroll bar to the bottom of the right

3 ) Click ADD button to open Lib Project selection dialog box

4 Select the project from the Select dialog box and click OK

5 ) Click Apply button, click OK Button

3 , in the main project manifest.xml declared in file Lib components of the project

Main Project manifest.xml must be added in Library all of the works Activity , Service , receiver , provider , you also add Library Works of Permission , uses-library attribute, note that the referenced component uses the full package name, otherwise it will report the corresponding notfoundexception .

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.