===========引入aar==================================
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 21//这里必须比引用的库项目所要求SDK大
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
debuggable false
shrinkResources true // 是否去除无效的资源文件
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
repositories {//=====引入aar
flatDir {
dirs 'libs'
}
}
}
dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar']) //=====引入aar
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile(name: 'bluetoothlib', ext: 'aar') //=====引入aar
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile files('libs/Cocoframe_mini.jar')}
studio 操作记录
最新推荐文章于 2024-06-17 17:21:06 发布