【AndroidStudio】Libraryモジュールの作成/参照

プロジェクトを作る。

File > New Module > Android Library

no activityを選択

例えば、モジュール名をxxxとする。

 

Module: appのbuild.gradleに

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile project(':xxx')

}

 

で、appから参照できる。

Leave a Reply