0

I'm trying to upload a .apk of my app to the google play console. When I run flutter build apk and upload it, I get an error because the SHA1 Key from the uploaded .apk is different from the SHA1 key from a previously uploaded .apk.

Previously I build an appbundle in Android Studio where I had to create a KeyStore, that was the first version I uploaded to the play console.

So how can I change the SHA1 key used when running flutter build apk to the one I used previously?

Jonas
  • 7,089
  • 15
  • 49
  • 110
  • Are you using **App Signing by Google Play**? – Chenna Reddy Oct 20 '19 at 15:51
  • @ChennaReddy Idk honestly, for my first build, I followed this: https://stackoverflow.com/questions/55536637/how-to-build-signed-apk-from-android-studio-for-flutter after that it asked me to create a KeyStore wich I did and the created the signed apk and uploaded it to the play console. Thanks for the response btw! – Jonas Oct 20 '19 at 15:56
  • Usually Android Release Keystore is mentioned in `android/app/build.gradle` at `signingConfigs.release`, see if you can point it to right keystore. Regd, **App Signing by Google Play**, you can go to Google Play Console -> Release Management -> App Signing, there you can see who manges the Signing. – Chenna Reddy Oct 20 '19 at 16:02
  • I just tired pointing it to the right keystore like this https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app Now when building the app, I get `java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: jarsignerfailed with exit code 1 : jarsigner: Certificate chain not found for: key. key must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.` – Jonas Oct 20 '19 at 16:18
  • I liked my `storeFile` like this `storeFile=/Users/jonas/MyKeyStore.jks`, The path should be correct... – Jonas Oct 20 '19 at 16:20
  • Are you using the same jks file which you used previously. – xaif Oct 21 '19 at 02:49
  • @xaif somehow the KeyStore I created in Android Studio wasn't a `.jks` File. I just deleted the app in the google play console and followed these steps: https://flutter.dev/docs/deployment/android#create-a-keystore and after uploaded it again – Jonas Oct 21 '19 at 08:09

0 Answers0