Answer by Quang Nhat for Use a specific minSdkVersion only in a Debug mode
Try thisandroidComponents { beforeVariants(selector().withName("debug")) { variantBuilder -> variantBuilder.minSdk = 21}}For more information about beforeVariants, can check this link
View ArticleAnswer by lionscribe for Use a specific minSdkVersion only in a Debug mode
I know this is an old question, but there is a very simple solution, even without setting up separate flavors. Just replace the line;minSdkVersion 21withminSdkVersion...
View ArticleAnswer by Roman Nazarevych for Use a specific minSdkVersion only in a Debug mode
There exist a better way to do it without Product Flavors or hooking into the build flow.Example: buildTypes { debug { defaultConfig.minSdkVersion 19 defaultConfig.vectorDrawables.useSupportLibrary =...
View ArticleAnswer by Pier Betos for Use a specific minSdkVersion only in a Debug mode
It took me almost a day to create this script. Please take note of this for keepsake, but only use this as a last resort.android.applicationVariants.all { variant -> //Making specific variant...
View ArticleAnswer by M-Wajeeh for Use a specific minSdkVersion only in a Debug mode
I don't wanna use flavors for this because will give troubles.I don't think you can do it without productFlavors. I am leaving this answer here for others who have no issue using...
View ArticleUse a specific minSdkVersion only in a Debug mode
How can I use a specific minSdkVersion only in a debug mode?I want to use the minSdkVersion 21 for debug mode, but minSdkVersion 15 for the release. I don't wanna use flavors for this because will give...
View Article