AndroidStudio 多层级 Module 对 aar 引用问题

方式一:转载地址:http://blog.csdn.net/wwj_748/article/details/53230706

方式二:转载地址:http://www.cnblogs.com/bellkosmos/p/6146349.html

方式三:当前我采用的方式提交本地aar文件到私服仓库,可以在一个空的安卓类库中,然后在对应的module中引用。提交私服代码如下:

configurations.maybeCreate("default")
artifacts.add("default", file('xxx.aar'))
apply plugin: 'maven'

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "http://${LOCALHOST}:${PPORT}/nexus/content/repositories/android/") {
                authentication(userName: "${USERNAME}", password: "${PASSWORD}")
            }
            pom.project {
                groupId ''
                artifactId ''
                packaging 'aar'
                version ''            }
        }
    }
}