'How to Update a flutter app on already published native android using java app in play console

I have published a native app with package name e.g (com.hamzamuazzam.foo) in Google Playstore and I want to update my app that is now made in flutter , also have made all the necessary changes in my code.

new flutter app made with same package name (com.hamzamuazzam.foo) as old native app that is already published in google playstore.

Now, my main question is that can I update my new flutter App with Native app without changing the Package name in google play store ,

will Google play console allow me to update flutter app with same package name over the same native app?



Solution 1:[1]

Yes, you can update your app. Generally speaking, only three rules apply for updates:

  1. The package name must be identical.
  2. The versionCode must be greater than the versionCode of the previously released app.
  3. The app must be signed with the same signing key as before.

Besides that, it doesn't matter if you create your APK or Android App Bundle with Kotlin/Java, Flutter, Xamarin, React Native, Cordova or any other technology.

Solution 2:[2]

@Alex's answer is perfect, but I'd like to detail the info with the following (for Flutter scenario):

  1. Yes, the package name must be identical, and this can be verified within Android's (Flutter version) AndroidManifest.xml file.

  2. When we're talking about the versionCode and versionName, this info is obtained from Flutter's pubspec.yaml file with version attribute. This attribute has the form of 0.3.2+3 where 0.3.2 corresponds to versionName and 3 (the number after + sign) to versionCode. And yes, the versionCode must be greater than the versionCode of the previously released app

And finally, the keystore-password-alias used to sign Android Flutter's version must be the same used to sign the Android's native release.

Taking all of this into consideration will allow you to do the update smoothly.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alexander Hoffmann
Solution 2 Carlos Daniel