Android笔记之引用aar

把要引用的aar文件复制到目录app\libs中(我要引用的aar名为xybigdatasdk-release-out2.2.6.aar)

在build.gradle (Module: app)中添加以下代码

android {
    ...
    repositories {
        flatDir {
            dirs 'libs'
        }
    }
}

dependencies {
    ...
    implementation(name: 'xybigdatasdk-release-out2.2.6', ext: 'aar')
}

Sync Now

接下来就可以使用aar中的资源或类了^_^

猜你喜欢

转载自www.cnblogs.com/buyishi/p/10605877.html