Reputation: 181
I'm setting up Product Flavor in Android Studio ,there is created multiple build variants in studio
like
FlavourDebug1-armeabi-v7a
FlavourDebug1-arm64-v8a
FlavourDebug1-x86
FlavourDebug1-x86_64
FlavourRelease1-armeabi-v7a
FlavourRelease1-arm64-v8a
FlavourRelease1-x86
FlavourRelease1-x86_64
=============
How to remove that and only get
Debug
Release
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxx.smart.xx.launcher"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++14"
}
}
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
javaCompileOptions {
annotationProcessorOptions {
arguments = ['objectbox.debug': 'true']
}
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
flavorDimensions "version"
productFlavors {
ChoiceIPTVFlavour {
applicationId 'com.xxx.smart.xx.launcher'
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
PurpleIPTVFlavour {
minSdkVersion 21
applicationId 'com.xxx.smart.xx.launcher'
targetSdkVersion 28
versionCode 1
versionName '1.0'
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
}
Upvotes: 3
Views: 2025
Reputation: 4643
remove code like this from your gradle
splits {
abi {
enable true
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a", "armeabi", "mips", "mips64"
universalApk true //generate an additional APK that contains all the ABIs
}
}
Upvotes: 1