Skip to content Skip to sidebar Skip to footer

Add .aar File To Java Module(sub Project) In Android Studio

I would like to add .aar file to my java module (sub project).i have added this in my gradle still get error as 'Could not find filename' flatDir { dirs 'src/main/libs'

Solution 1:

You should follow below steps in Android Studio:

  1. Right click on your project and select "Open Module Settings".
  2. Click the "+" button in the top left corner of window to add a new module.
  3. Select "Import .JAR or .AAR Package" and click the "Next" button.
  4. Find the AAR file using the ellipsis button "..." beside the "File name" field.
  5. Keep the app's module selected and click on the Dependencies pane to add the new module as a dependency.
  6. Use the "+" button of the dependencies screen and select "Module dependency".
  7. Select the module and click "OK".

Then Clean, Rebuild and Make your project.

Solution 2:

Post a Comment for "Add .aar File To Java Module(sub Project) In Android Studio"