31.8 Flutter App Bundle for Google Play Store

20241022

First 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 (if you protect your key) can sign the app thus upload the app to the Google Play Store.

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:

keytool -list -v -keystore ~/upload-keystore.jks

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.

Now build the app bundle, signed with this key:

flutter build appbundle

Now check the key:

keytool -printcert -jarfile build/app/outputs/bundle/release/app-release.aab

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.



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