Follow this setting and you will able to add .aar
dependency to library module
build.gradle (Project: ....)
allprojects {
repositories {
jcenter()
mavenCentral()
flatDir {
dirs 'libs'
dirs project(':library_module').file('libs')
}
}
}
build.gradle (Module: app)
dependencies {
...
compile project(':library_module')
}
build.gradle (Module: library_module)
dependencies {
...
compile(name:'aar_file_name', ext:'aar')
}
settings.gradle (Project Settings)
include ':app', ':library_module'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…