How do I import AAR file?

Follow

There are 2 approaches to this:

Approach 1:

 

Place Teamcht.aar file in project’s lib folder and add the following lines to app’s gradle file.:

    android {
   .
   .
   packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/NOTICE.txt'
      exclude 'META-INF/LICENSE.txt'
   }
   .
   .
}
repositories{
   flatDir{
       dirs 'libs'
   }
}

dependencies {
   .
   .
   compile(name:'Teamchat', ext:'aar')
   .
   .
}




Approach 2:

Step 1: Right click on project in project structure.

Step 2: Click on New->Module.

Step 3 : Click on Import .Jar or .Aar package.

Step 4 : Click next.

Step 5 : Now browse and select the Teamchat.aar file.

Step 6 : Click Finish. Now the module will be created.

Step 7: Click on project structure and go in dependency section of the module of your app.

Step 8 : Click on plus sign on right side and add teamchat module in the dependencies.

Have more questions? Submit a request

Comments

Powered by Zendesk