Uncategorized
 

How to Publish Flutter App on Play Store

If you have developed a Flutter app and want to publish it on the Play Store, you might be wondering how to do it. Similar to iOS, the process is not that difficult. In this blog post, I will guide you through the steps to publish Flutter app to Play Store, from creating a release bundle to submitting it for review.

Step 1: Add a Launcher Icon

Once you’ve crafted your icon design, the next step is to seamlessly integrate it into your project.

Navigate to the App Icon Generator tool, drag and drop your icon onto the designated area within the tool.

Opt for the Android platform and initiate the generation process by clicking the Generate button.

As a result of the generation process, you’ll receive a zip file encompassing a diverse array of icon sizes that are essential for a polished application release.

app icon generator

Extract the contents of the received zip file to access the individual folders: android (housing mipmap subfolders), playstore icon (which you’ll employ later during publishing), and appstore icon.

app icon

Efficiently manage your icons by copying the entire array of folders located within the android directory. Proceed to replace the corresponding mipmap folders within the following path: android > app > src > res.

To validate the successful icon integration, execute a test run of your application.

With these steps, you’ve effectively integrated your launcher icon into your project. Now, it’s time to give your app a distinct identity by renaming it. Additionally, consider updating the bundle and app IDs to align with your vision.

Step 2: Rename the App, BundleId, AppId

To initiate the process, begin by running the required command. In your terminal, enter:

pub global activate rename

With the command activated, proceed to rename your app. Execute the subsequent command in your terminal:

pub global run rename –appname “YourAppName”

Replace YourAppName with your desired app name. In the terminal, you will see the following:

Next, adjust the Bundle ID with the following command:

pub global run rename –bundleId com.yourdomain.yourappname

Customize the Bundle ID by replacing com.yourdomain.yourappname with your preferred Bundle ID. In the terminal, you will see the following:

Make sure both the Bundle ID and App ID are unique. It is important for your app promotion.

Next, validate the changes by running your app and observing whether the modifications are successfully reflected.

Step 3: Sign the App

To publish your app on PlayStore, you need to sign your app with a digital signature.

Create a key.properties file within the android folder of your project.

Insert the following text into the created key.properties file:

storePassword=eChim2v6qKn3     ”’use your password here and make sure to keep it in secret.”’

keyPassword=eChim2v6qKn3

keyAlias=upload

storeFile=<location of the key store file, such as /Users/<user name>/upload-keystore.jks>

Execute the subsequent command in your terminal:

For Windows

keytool -genkey -v -keystore c:\Users\nakum\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload

For Mac / Linux

keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

fluter app development

Locate the generated key file and navigate to its file location.

Transfer the upload-keystore.jsk file to the android > app directory.

Within the key.properties file, ensure the storeFile path is accurately updated:

storePassword=eChim2v6qKn3

keyPassword=eChim2v6qKn3

keyAlias=upload

storeFile=../app/upload-keystore.jks

Go to [project] > android > app > build.gradle and insert the following text just above android { … }:

def keystoreProperties = new Properties()

def keystorePropertiesFile = rootProject.file(‘key.properties’)

if (keystorePropertiesFile.exists()) {

  keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

}

Proceed to remove the existing buildType{ … } content and replace it with the following text:

signingConfigs {

     release {

         keyAlias keystoreProperties[‘keyAlias’]

         keyPassword keystoreProperties[‘keyPassword’]

         storeFile keystoreProperties[‘storeFile’] ? file(keystoreProperties[‘storeFile’]) : null

         storePassword keystoreProperties[‘storePassword’]

     }

 }

 buildTypes {

     release {

         signingConfig signingConfigs.release

     }

 }

Step 4: Deploy Android App Bundle

Clean previous build by purging any remnants of previous builds. Employ the command below to execute a comprehensive cleaning operation:

flutter clean

Execute the following command to generate an APK file

flutter build apk

or an app bundle

flutter build appbundle

Following the command execution, an Android App Bundle (AAB) will be generated. Locate this AAB at build > app > output > bundle > app-release.aab / app-release.apk.

With the AAB or APK in hand, you’re now primed to initiate the publication process via the Developer Console.

Step 5: Create a Google Play Developer Account

If you don’t have one already, create a Google Play Developer account at https://play.google.com/apps/publish.

Step 6: Create an App

Next, click on the Create App button and add App NameDefault LanguageApp TypeFree or Paid and check all the fields.

Step 7: Add Store Listing

Begin by accessing the Store Presence section. Locate and click on the Main store listing.

Add the short and full description and upload your app icon. Find the playstore.png file and drag and drop it into the designated App icon box.

Elevate your app’s appeal by incorporating feature graphics. Include at least two screenshots in the phone screenshots section. For those targeting 7- and 10-inch tablets, upload related screenshots within the Tablet section.

Step 8: Store Setting

In the Store Settings, select your app category and add tags, as well as add your email, phone number, and website URL. Then add countries where you want to show your app, your Privacy policy, app access, and select if your app contains built-in ads.

In the Content Rating section, choose the category that best fits your app.

In the Target audience and content section, specify the age groups you intend to target with your app.

Step 9: Wait for Review and Publish Your App

After submitting your release for review, you will have to wait for Google to approve it. This usually takes a few hours or days, depending on the complexity and quality of your app. You can check the status of your review by going to the Release section of the Google Play Console and selecting your release.

Once Google approves your release, it will be published on the Play Store and available for users to download and install. Congratulations! You have successfully published your Flutter app on the Play Store!

Possible Issues and Errors When Publishing Flutter App in Play Store

Many possible issues and errors can arise during the process.

Signing the app in debug mode instead of release mode. This can cause Google Play to reject the app as it is not secure enough for distribution. To fix this, you need to create a signing config for release mode in your build.gradle file and use it when building the app.

Violating Google Play policies or guidelines. This can cause the app to be rejected or removed from the Play Store due to issues such as privacy, security, content, functionality, or intellectual property. To fix this, you need to review the Google Play policies and guidelines and make sure that your app complies with them.

Minify issues: Minifying your app may also cause some errors related to obfuscation or shrinking, such as missing classes, methods, or fields. To avoid them, enable R8 as the code shrinker for your app, and add proguard rules to preserve the necessary classes and methods for your app.

Bundle issues: Bundling your app is a new format that allows Google Play to generate and serve optimized APKs for each device configuration. However, bundling your app may also cause some errors related to compatibility or verification, such as unsupported architectures or invalid signatures. To avoid these errors, you need to use the latest version of Flutter and Android Studio and build your app bundle using the flutter build appbundle command.

Conclusion

You have learned how to publish your Flutter app on the Play Store. It includes creating an app bundle, generating a signing key, registering your app on Google Play Console, as well as how to upload Flutter app to Google Play and release it to the users. It’s an important milestone in your app development journey and helps reach a wider audience.

Save your time! Request Google Play upload by AppsGeyser professional – Publish your App