在Android Studio创建的主module app 依赖aar文件。
build.gradle中配置:
android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { minSdkVersion 23 targetSdkVersion 25 versionCode 1 versionName "1.0" } repositories { //这部分是关键 flatDir { dirs "libs" } } } dependencies { compile(name: ‘xxx’, ext: ‘aar’) }