Android引用本地aar

先建立一个lib工程,然后build出aar。

接着把aar放入要引入它的工程module的libs中。

在project的build.gradle中:

repositories {
    flatDir {
        dirs 'libs' //this way we can find the .aar file in libs folder
    }
}

在app中的build.gradle中:

dependencies {
    compile(name:'你的aar的名字', ext:'aar')
}

 

参考自:

http://stormzhang.com/android/2015/03/01/android-reference-local-aar/

posted @ 2015-07-29 17:39  developer_Kale  阅读(1515)  评论(0编辑  收藏  举报
网站流量统计工具