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

1,765

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
Share:
1,765
Chethan CV
Author by

Chethan CV

Updated on December 21, 2022

Comments

  • Chethan CV
    Chethan CV over 1 year

    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?

    • Akora Ing. DKB
      Akora Ing. DKB almost 4 years
      Did you sign with the same keystore as us used for the first version?
    • Chethan CV
      Chethan CV almost 4 years
      @ Akora Ing. DKB Thats what I dont undertstand....what ever last time key file I had in my C drive,I still have the same....and the key.properties file have the same value
    • Chethan CV
      Chethan CV almost 4 years
      @ Akora Ing. DKB how do actually sign it?I mean u just need to create the key.properties file and put in your values and link to the key.jks in it.Am I missing something?I mean I am not understanding these documentations properly as well
  • Haplo
    Haplo about 3 years
    Wow thanks for this, I also did not catch that the first time around!