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
There are 2 ways:
The first way
Create New Module
window by File -> New -> New Module
Select the Import .JAR/.AAR Package
item and click the Next
button
Add a dependency in the build.gradle
file that belongs to your app
module.
dependencies {
...
implementation project(path: ':your aar lib name')
}
That's all.
The second way
Create a folder in libs
directory, such as aars
.
Put your aar lib into the aars folder.
Add the code snippet
repositories {
flatDir {
dirs 'libs/aars'
}
}
into your build.gradle
file belongs to the app module.
build.gradle
file that belongs to your app
module.dependencies {
...
implementation (name:'your aar lib name', ext:'aar')
}
That's all.
If you can read Chinese, you can check the blog 什么是AAR文件以及如何在Android开发中使用