Quantcast
Channel: Use a specific minSdkVersion only in a Debug mode - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by M-Wajeeh for Use a specific minSdkVersion only in a Debug mode

$
0
0

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 productFlavors.https://developer.android.com/studio/build/multidex.html#dev-build

Basically all you need to do is declare productFlavors with different minSdkVersion:

productFlavors {    dev {        // Enable pre-dexing to produce an APK that can be tested on        // Android 5.0+ without the time-consuming DEX build processes.        minSdkVersion 21    }    prod {        // The actual minSdkVersion for the production version.        minSdkVersion 14    }}

Viewing all articles
Browse latest Browse all 6

Trending Articles