Your Android App Bundle is signed with the wrong key while updating my app in flutter Error

Viewed 1948

I just dont quite understand why is this happening to me.I followed all the steps as in https://flutter.dev/docs/deployment/android to upload my first version.There was something wrong in it.So I created another (a previous kind of backup project)flutter project and modified it to the existing one.I changed the com.flutterappstareawayvrsn1 which was initially something else.

I have put the key and it still shows the error:

Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again: :********************

How do you fix this thing?

1 Answers

I figured out what I was doing wrong.As per instructions in https://flutter.dev/docs/deployment/android

Original Code was:

  buildTypes {
       release {
           // TODO: Add your own signing config for the release build.
           // Signing with the debug keys for now,
           // so `flutter run --release` works.
           signingConfig signingConfigs.debug
       }
   }

The Modified code was to be:

With the signing configuration info:

content_copy


    signingConfigs {
           release {
               keyAlias keystoreProperties['keyAlias']
               keyPassword keystoreProperties['keyPassword']
               storeFile keystoreProperties['storeFile'] ? 

file(keystoreProperties['storeFile']) : null


              storePassword keystoreProperties['storePassword']
           }
       }
       buildTypes {
           release {
               signingConfig signingConfigs.release
           }
       }

    But I didnt modify buildtypes
    {
    ..
    .}

I took it for granted and kept it in debug rather than release
Related