Android Studio Create AAR package with reference

Source: Internet
Author: User

The difference between the two:
*.jar: Contains only the class file and the manifest file, does not contain the resource file, the slice and so on all res files.
*.aar: Contains all resources, class, and res resource files all contain

First, create the AAR package
1. Create an Android library
2, obtain the AAR package, under the Lib project Build/outpus/aar/lib.aar



1) Create Lib module and fill in the relevant information




2) Get AAR files in the corresponding directory


Second, reference Association
1. Import an AAR (similar to creating a module step)
2. Referencing AAR files



1. Import an AAR


2) Select Import imports. jar or. AAR package


3) Select File


4) associated References



5, the call-off, in the code can be referenced

Android Studio Create AAR package with reference

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.