I have a game on Google Play that I have to update. The game was made long time ago in Unity 2017, at the time I don not remember having any app signing process, or if I had I dont remember where that file is.
When uploading the apk to Google play I got the error:
Upload failed
You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
[ SHA1: F9:F0... ]
and the certificate used to sign the APK you uploaded have fingerprint:
[ SHA1: 3D:67... ]
I searched this problem and followed the following threads and accepted solutions: https://answers.unity.com/questions/1372982/how-i-can-sign-my-apk-with-an-google-plays-upload.html and Signing an APK with an upload key provided by Google Play
Here is what I did:
- I created a new keystore file in unity and a new key and gave it the alias
user. - I downloaded the upload certificate from my Play console.
- I then added the upload certificate to my keystore file that I generated in first step using :
keytool.exe -importcert -file upload_cert.der -keystore <keystorefile> - This worked fine and when I check the keystore file with the command:
keytool.exe -list -keystore "C:\user1.keystore":
.
Keystore type: jks
Keystore provider: SUN
Your keystore contains 2 entries
user, 06-May-2019, PrivateKeyEntry,
Certificate fingerprint (SHA1): FD:A6:5A:...
mykey, 06-May-2019, trustedCertEntry,
Certificate fingerprint (SHA1): F9:F0:89:...
As can be seen that the command added the required certificate key to my keystore but it created a different entry for it mykey and did not overwrite user.
Now when I want to build my apk in unity and choose the keystore and key from publishing settings, only the user alias shows up there, and the apk is signed with the user SHA1 and not the required mykey SHA1.
I just cant seem to get this silly update out and Ive wasted a full day trying to fix this. Any help would be appreciated.
Thanks