To publish on the Play Store, you need to sign your app with a digital certificate.
Android uses two signing keys: upload and app signing.
Developers upload an .aab or .apk file signed with an upload key to the Play Store.
The end-users download the .apk file signed with an app signing key.
To create your app signing key, use Play App Signing as described in the official Play Store documentation.
To sign your app, use the following instructions.
Create an upload Keystore
If you have an existing keystore, skip to the next step. If not, create one using one of the following methods:
Running the following at the command line:
On Mac/Linux, use the following command:
On Windows, use the following command:
This command stores the upload-keystore.jks file in your home directory. If you want to store it elsewhere, change the argument you pass to the -keystore parameter. However, keep the keystore file private; don’t check it into public source control!
Reference the Keystore from the App
Create a file named [project]/src-tauri/gen/android/keystore.properties that contains a reference to your keystore:
Configure Signing in Gradle
Configure gradle to use your upload key when building your app in release mode by editing the [project]/src-tauri/gen/android/app/build.gradle.kts file.
Add the needed imports at the beginning of the file:
Add the release signing config before the buildTypes block:
Use the new release signing config in the release config in buildTypes block:
Release builds of your app will now be signed automatically.