productFlavors {
// Define separate dev and prod product flavors.
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 21
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 14
}
}
这是android studio工程中build.gradle文件的一段代码,
哪位大神帮我解释一下这段代码什么意思?
字面的意思还是很好理解吧。
定义了两个编译输出任务 dev(调试) 和 prod(生产),dev时指定最小支持版本为21,可配合Android5.0版本特性,减小dex文件合并进程时间,使调试更迅速。prod指定最小支持版本为14,为正式版本支持兼容定义。