1. 程式人生 > >android studio生成junitLibs

android studio生成junitLibs

atd eset otto eas ets tree span roi srcdir

apply plugin: ‘com.android.application‘

android {
compileSdkVersion 24
buildToolsVersion "25.0.0"


sourceSets {
main {
jniLibs.srcDirs = [‘libs‘]
}
}

defaultConfig {
applicationId "com.lt.bottomtabdemo"
minSdkVersion 9
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.txt‘
}
}
}
repositories {
flatDir {
dirs ‘libs‘
}
}
dependencies {

compile fileTree(include: ‘*.jar‘, dir: ‘libs‘)
compile ‘com.android.support:support-v4:25.0.1‘
testCompile ‘junit:junit:4.12‘

}

默認android studio的
defaultConfig節點在android節點內部,將defaultConfig節點提出來放外面,然後在android節點裏面增加sourceSets節點。然後在dependencies裏面增加編譯代碼testCompile ‘junit:junit:4.12‘


android studio生成junitLibs