32.9 Flutter App Bundle for Android
20251006
Be sure to change com.example to com.mydomain.myapp, as appropriate, throughout the app.
We can then build the signed app bundle.
The file android/key.properties
contains information required to
sign the app. The app is signed to assure that only you can sign the
app thus upload the app to the Google Play Store (if you protect your
password and key file upload-keystore.jks
) .
storePassword=MYPASSWORD
keyPassword=MYPASSWORD
keyAlias=upload
storeFile=/home/kayon/upload-keystore.jks
The keystore is created with:
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
You can check the key with:
A snippet:
Keystore type: PKCS12
...
Owner: CN=Kayon Toga, OU=Solid Pods, O=Togaware, L=Canberra, ST=ACT, C=AU
...
Certificate fingerprints:
SHA1: 2F:45:1G:67:A2:BC:D3:9E:E6:47:42:16:6F:A8:34:DD:92:62:E3:7D
...
The SHA1 fingerprint here is stored with the signed app bundle as below.
Visit https://docs.flutter.dev/deployment/android for updates to
android/app/build.gradle.kts
and
android/app/src/main/AndroidManifest.xml
.
Now build the app bundle, signed with this key (noting that
--release
is the default):
Now check the key to enusre it is your key and not the default debug key (i.e., it matches your key as above):
And note the key:
Signer #1:
Certificate #1:
Owner: CN=Kayon Toga, OU=Solid Pods, O=Togaware, L=Canberra, ST=ACT, C=AU
...
Certificate fingerprints:
SHA1: 2F:45:1G:67:A2:BC:D3:9E:E6:47:42:16:6F:A8:34:DD:92:62:E3:7D
...
On the Google Play Console choose the App, navigate to the Release overview and then the Release dashboard. Tap on Create new release to then upload the new release to the App bundles.
Also see https://codewithandrea.com/articles/how-to-release-flutter-google-play-store/
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0
