Skip to main content

Posts

Showing posts from May, 2022

Mysterious Android version code = configured value plus 2000

If you are building Flutter app and shows app version in-app for users to see (mostly testers). You may run into a weird issue that the version code is different from the configured value. E.g. if you run ` flutter build --build-number=1234 ` it will show up as ` 3234 `, 123 shows up as ` 2123 `... What the hell is happening? flutter.gradle#L864-L876  is the culprit. Basically ` --split-per-abi ` will increase the version code number by 1000, 2000, 3000, etc. as seen above. If you don't want that behavior, just build one single fat APK.