方式一:轉載地址:http://blog.csdn.net/wwj_748/article/details/53230706html
方式二:轉載地址:http://www.cnblogs.com/bellkosmos/p/6146349.htmlandroid
方式三:當前我採用的方式提交本地aar文件到私服倉庫,能夠在一個空的安卓類庫中,而後在對應的module中引用。提交私服代碼以下:app
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 '' } } } }