I've an application built using Android Studio. Recently enhanced it using Ionic 3.0. When i'm trying to build with the same package name & certificate Google Play shows an error like SHA1 key differs.
- The package name remains same.
- Version info updated (6.0 as ionic, v5.0 already in google play prod)
- ionic cordova build --release android
- jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore sample.jks sample-unsigned.apk storekey
- zipalign.exe -v 4 sample-unsigned.apk prod.apk
- Google Play upload failed
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s): [ SHA1: 18:3B:40:F3:05:E6:03:1E:CA:CC:69:BF:BA:58:8A:BC:D9:65:28:83 ] //Not sure from where its being referred.
and the certificate(s) used to sign the APK you uploaded have fingerprint(s): [ SHA1: 71:16:65:C5:97:67:0D:4F:7A:D8:26:50:5A:C9:24:54:89:81:0E:BA ]
keytool -exportcert -keystore sample.jks -list -v prints the same key: SHA1: 71:16:65:C5:97:67:0D:4F:7A:D8:26:50:5A:C9:24:54:89:81:0E:BA
Any idea what i'm missing? Your suggestions are much appreciated.Thanks.