Created
April 16, 2021 12:11
-
-
Save gabrimatic/010d76aaa1df0fda766200c6114ea601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Customize app/build.gradle as bellow: | |
android { | |
... | |
flavorDimensions "api" | |
productFlavors { | |
minApi18 { | |
dimension "api" | |
minSdkVersion 18 | |
versionCode 10000 + flutterVersionCode.toInteger() | |
versionName flutterVersionName | |
versionNameSuffix "-minApi18" | |
ndk { | |
abiFilters 'x86_64' | |
} | |
} | |
minApi19 { | |
dimension "api" | |
minSdkVersion 19 | |
versionCode 20000 + flutterVersionCode.toInteger() | |
versionName flutterVersionName | |
versionNameSuffix "-minApi19" | |
ndk { | |
abiFilters 'armeabi-v7a' | |
} | |
} | |
minApi20 { | |
dimension "api" | |
minSdkVersion 20 | |
versionCode 30000 + flutterVersionCode.toInteger() | |
versionName flutterVersionName | |
versionNameSuffix "-minApi20" | |
ndk { | |
abiFilters 'arm64-v8a' | |
} | |
} | |
} | |
} | |
Then release app by following command: | |
flutter build apk --release --obfuscate --split-debug-info=/app_name --flavor a_flavor_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment