1

I have created an Android native application first. Then I uploaded into play store. Then afterwards I created an application using flutter. I used same package name and all. Then now am trying to upload new flutter app to the play store. So am not able to upload when am trying to upload it is showing 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: SHA1:.

How can I take release build with flutter using the existing keystore file?

Sunisha Guptan
  • 1,555
  • 17
  • 44
  • This may help https://flutter.dev/docs/deployment/android – Darish Feb 13 '20 at 13:58
  • Use previous Keystore file you used for your old `Native Android` app for signing your new `Flutter` release build – Blu Feb 13 '20 at 14:05
  • @Blu how can I check which keystore file it is taking? – Sunisha Guptan Feb 13 '20 at 14:10
  • Open your old project in android studio, try creating the release build & while creating the build check for the old Keystore you used, check for the location of it & copy it to your new Flutter app... Try keeping Keystore files in a separate folder as a backup for a long time usage. – Blu Feb 13 '20 at 14:20
  • I know that which keystore file it is used. I have added that file in my project also. And in gradle file am using like this with details also signingConfigs { release { – Sunisha Guptan Feb 13 '20 at 14:22
  • @SunishaSindhu you creating build from android studio or visual studio code? – Blu Feb 13 '20 at 14:27
  • maybe this is the same situation as your situation, try reading it once https://stackoverflow.com/questions/51168235/how-to-get-signed-apk-for-flutter-with-existing-app-keystore?rq=1 – Blu Feb 13 '20 at 14:28
  • @Blu android studio – Sunisha Guptan Feb 13 '20 at 14:29
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/207770/discussion-between-sunisha-sindhu-and-blu). – Sunisha Guptan Feb 13 '20 at 14:36

1 Answers1

0

Just sign with the same *.jks file you used for your previous Android App.

And follow this guide. https://flutter.dev/docs/deployment/android#signing-the-app

NqbraL
  • 553
  • 4
  • 8
  • Hi I think it is taking debug ask file always. How can I change? – Sunisha Guptan Feb 13 '20 at 14:05
  • Try to follow the "Reference the keystore from the app" and "Configure signing in gradle" sections of the guide with your previous keystore file. If you want to be sure to generate your APK, with the correct signature file. Use 'bundletool' -> https://developer.android.com/studio/command-line/bundletool#generate_apks – NqbraL Feb 13 '20 at 14:17
  • am not able to see /android/key.properties – Sunisha Guptan Feb 13 '20 at 14:18
  • You have to create the file :) – NqbraL Feb 13 '20 at 14:19