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:
- Right click on your project and select "Open Module Settings".
- Click the "+" button in the top left corner of window to add a new module.
- Select "Import .JAR or .AAR Package" and click the "Next" button.
- Find the AAR file using the ellipsis button "..." beside the "File name" field.
- Keep the app's module selected and click on the Dependencies pane to add the new module as a dependency.
- Use the "+" button of the dependencies screen and select "Module dependency".
- Select the module and click "OK".
Then Clean, Rebuild and Make your project.
Solution 2:
For Android Studio 4.2 and above, please use these instructions from the documentation https://developer.android.com/studio/projects/android-library#psd-add-aar-jar-dependency
Post a Comment for "Add .aar File To Java Module(sub Project) In Android Studio"