1.在你的主app的 build.gradle文件中添加對native源碼庫的引用
dependencies {
debugCompile project(path: ':源碼庫', configuration: 'debug')
releaseCompile project(path: ':源碼庫', configuration: 'release')
}
2.修改native源碼庫的 build.gradle文件以啟用publishNonDefault
android {
publishNonDefault true
}