I just inherited an old project, which created back in 2013.
The guys used to build an unsigned apk, and then run those commands:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystore.keystore app-release-unsigned.apk alias
jarsigner -verify app-release-unsigned.apk
zipalign -v 4 app-release-unsigned.apk app-release-signed.apk
And then upload the signed apk to play store.
However, when I generate signed apk with android studio, it results in apk with different signature.
As a result when I upload it to play store, it shows an error:
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: sha1..#1 and the certificate(s) used to sign the APK you uploaded have fingerprint(s): SHA1: sha1..#2
Is there a way to sign the apk with android studio so it results with same apk?
This is not the most convenient way to sign it manually...
Thanks