How to Publish Flutter App on Play Store
Durgesh Sharma
Full Stack Developer @ Novonesis | AI | LLM | Deep Learning | MERN | Coding Enthusiast
1. Create a developer account
Access the Google Play Console and create a new developer account, for that is charged a single payment of US$ 25, after that you’ll be able to publish your apps.
2. Update the app name
Open AndroidManifest.xml (android/app/src/main/AndroidManifest.xml) and update the android label. The android label represents the application name, it’s the one that will be displayed on your phone as the app name.
3. Generate a keystore
To be able to deploy the app to the store we’ll need to sign it, the first thing we should do is create a keystore.
To generate a new keystore run the following command:
When creating the new keystore you will be asked to enter a password, it’s important to keep it, since it will be necessary later.
4. Move the key file to the project
Move the key file (my-key.jks in the exemple) to android/app, don’t forget to add the keystore into .gitignore if you have a public repository.
5. Create a key.properties file
We’ll create a file that references the keystore, to do that, inside the android folder create a ‘key.properties’ file. Open the file and paste the content below, updating it with your keystore values.
Your project structure now should look like this:
6. Updating build.gradle
Go to android/app/build.gradle and update it with the highlighted lines:
领英推荐
7. Build the app
Now we can build the app as a appbundle, so it can be deployed to the store.
Run in your terminal:
If you are using flavors run:
And if you created you app using very good ventures run:
After the build has finished, a new message will appear in the terminal, showing the output folder where your .aab file is located.
8. Deploy the app
To deploy the application we need to create a new app at Google Play Console:
Go to “Internal testing”, create a new release, and upload you .aab
Add testers to the “internal testing” release, creating a email list
9. Updating the app
To update the app you’ll need to provide a version name and version code. To do that go to pubspec.yaml.