I created two Android Studio applications. One of them is aar library. I used this aar library in second application. I added aar library by using File->New->New Module->Import
Right now you're including the AAR through a project
notation. Since an AAR is literally just a file, it should be included with the files
notation instead.
Assuming a folder structure like so:
You could include the files with any of the following lines in the dependencies block of app/build.gradle
:
// include just my_library
implementation files('libs/my_library.aar')
// include just other_library
implementation files("$rootDir/common/libs/other_library.aar")
// include both libraries
implementation files('libs/my_library.aar', "$rootDir/common/libs/other_library.aar")
By the way, there's a reasonably complete list of supported dependency types at https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.dsl.DependencyHandler.html .