I\'ve been experimenting with the new android build system and I\'ve run into a small issue. I\'ve compiled my own aar package of ActionBarSherlock which I\'ve called \'act
Unfortunately none of the solutions here worked for me (I get unresolved dependencies). What finally worked and is the easiest way IMHO is: Highlight the project name from Android Studio then File -> New Module -> Import JAR or AAR Package. Credit goes to the solution in this post
you can do something like this:
Put your local libraries (with extension: .jar, .aar, ...) into 'libs' Folder (or another if you want).
In build.gradle (app level), add this line into dependences
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
Just to simplify the answer
If .aar file is locally present then include
compile project(':project_directory')
in dependencies of build.gradle of your project.
If .aar file present at remote then include
compile 'com.*********.sdk:project_directory:0.0.1@aar'
in dependencies of build.gradle of your project.
With Android Studio 3.4 and Gradle 5 you can simply do it like this
dependencies {
implementation files('libs/actionbarsherlock.aar')
}
The standard way to import AAR file in an application is given in https://developer.android.com/studio/projects/android-library.html#AddDependency
Click File > New > New Module. Click Import .JAR/.AAR Package then click Next. Enter the location of the compiled AAR or JAR file then click Finish.
Please refer the link above for next steps.