Configurations for using AAR and Gradle in Android studio

Source: Internet
Author: User

Recently to help a friend to do an app, which used a lot of third-party module, so that the project is very large, very redundant, and then want to turn it into a jar to refer to. Jar is familiar to us, full name is java Archive and AAR full name is Android Archive as the name implies AAR for Android use library file that specific how to use it

A piece

An AAR is available in the compiled output file in the module of the project

The AAR file is then tested into the Libs file and then introduced into the Gradle file. Still very simple, by the way to remember a few gradle in the configuration (many online, want to learn Google a bit. )

    1. Complie Filetree (dir: ' xxx ', include:[' *.jar '): relies on all files in a directory that match the extension.
    2. Complie ' com.xx.xx:ProjectName:version ': Configuring the Maven library as a dependency
    3. Complie Project (': Anothermodule '): Configure another module to be dependent on the module, and the dependent module must be imported into the current project
    4. Complie files (' Xxx.jar '): Configures a jar package as a dependency.

Configurations for using AAR and Gradle in Android studio

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.