1、将aar格式第三方包,放入app/libs目录下(如果你只是其中的一个moudle需要该包,那么也是如此添加到该moudle下)
2、在app/build.gradle中,添加引用,如下:
repositories {
flatDir {
dirs 'libs' //this way we can find the .aar file in libs folder
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile project(':kao')
compile(name:'aa-release', ext:'aar')
compile(name:’bb-release', ext:'aar')
}
特别说明:如果aa需要cc的内容,需将cc一起添加。