1,在项目中新建module
2,新建Java类
3,在app中引入module:
build.gradle(module:app)中添加
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(':mylibrary')
}
4,jar生成:
项目编译之后jar包可以在下面的目录找到:
./mylibrary/build/intermediates/bundles/debug/classes.jar
./mylibrary/build/intermediates/bundles/release/classes.jar
2,新建Java类
3,在app中引入module:
build.gradle(module:app)中添加
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(':mylibrary')
}
4,jar生成:
项目编译之后jar包可以在下面的目录找到:
./mylibrary/build/intermediates/bundles/debug/classes.jar
./mylibrary/build/intermediates/bundles/release/classes.jar