You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone! I finally managed to flavorize my app thanks to @AngeloAvv but now I've bumped into another issues which is only Android related. Basically, the app sees all changes I make code side, of course, but it does not see the versionCode. This always remains stuck to version 64 even though I replaces it everywhere in the project.
I changed it in the pubsbec.yaml:
name: ginevra_distribuzioni
description: "The official Ginevra Distribuzioni app"
publish_to: "none"
version: 1.0.0+67
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def localPropertiesFile = rootProject.file('local.properties')
ext {
flutterVersionCode = localPropertiesFile.exists() ? new Properties().with { props ->
localPropertiesFile.withReader('UTF-8') { reader -> props.load(reader) }
props.getProperty('flutter.versionCode', '1')
} : '1'
flutterVersionName = localPropertiesFile.exists() ? new Properties().with { props ->
localPropertiesFile.withReader('UTF-8') { reader -> props.load(reader) }
props.getProperty('flutter.versionName', '1.0')
} : '1.0'
keystoreProperties = keystorePropertiesFile.exists() ? new Properties().with { props ->
keystorePropertiesFile.withInputStream { stream -> props.load(stream) }
props
} : null
}
android {
// ----- BEGIN flavorDimensions (autogenerated by flutter_flavorizr) -----
flavorDimensions += "flavor-type"
productFlavors {
prod {
dimension "flavor-type"
applicationId "it.matbuompy.ginevra_distribuzioni"
versionCode 67
minSdkVersion 28
versionName "1.0.0"
resValue "string", "app_name", "Ginevra Distribuzioni"
}
dev {
dimension "flavor-type"
applicationId "it.matbuompy.ginevra_distribuzioni.dev"
versionCode 67
minSdkVersion 28
versionName "1.0.0"
resValue "string", "app_name", "Ginevra Distribuzioni Dev"
}
}
// ----- END flavorDimensions (autogenerated by flutter_flavorizr) -----
namespace = "it.matbuompy.ginevra_distribuzioni"
compileSdkVersion Math.max(flutter.compileSdkVersion, 34)
ndkVersion = "27.0.12077973"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "it.matbuompy.ginevra_distribuzioni"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 28
targetSdk = flutter.targetSdkVersion
versionCode = 67
versionName = "1.0.0"
}
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source = "../.."
}
dependencies {
implementation 'com.google.android.play:integrity:1.4.0' // Add this line
// Add other dependencies if needed
}
configurations.configureEach {
exclude group: 'com.google.android.gms', module: 'play-services-safetynet'
}
But when I build the appbundle with the command: flutter build appbundle --flavor prod -t lib/main_prod.dart and then I upload it to Play Console I get this error:
It seems like the versionCode is not being changed. This only affects Android by the way. iOS and web builds increment their build numbers correctly. How can I solve this on Android?
The text was updated successfully, but these errors were encountered:
Hi everyone! I finally managed to flavorize my app thanks to @AngeloAvv but now I've bumped into another issues which is only Android related. Basically, the app sees all changes I make code side, of course, but it does not see the versionCode. This always remains stuck to version 64 even though I replaces it everywhere in the project.
I changed it in the
pubsbec.yaml
:In the
flavorizr.yaml
:And my app gradle build file looks like this:
But when I build the appbundle with the command:
flutter build appbundle --flavor prod -t lib/main_prod.dart
and then I upload it to Play Console I get this error:It seems like the versionCode is not being changed. This only affects Android by the way. iOS and web builds increment their build numbers correctly. How can I solve this on Android?
The text was updated successfully, but these errors were encountered: