android studio生成junitLibs

【android studio生成junitLibs】敢说敢作敢为, 无怨无恨无悔。这篇文章主要讲述android studio生成junitLibs相关的知识,希望能为你提供帮助。

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‘














































    推荐阅读