Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio change SHA1

I am using the last version of the Android Studio, but when I try to send the app for PlayStore I can't because the SHA1 is different.

This is SHA1 from the certificate:

certificate

but the app build has this SHA1: from apk


I find a problem in Android Studio with my KeyStore. The Key store has a SHA1 but the app with this keystore has another.

Just try this:

$ keytool -list -v -keystore mycert.keystore will show: SHA1: 67:F0:AE:82:85:7C:BD:C8:A0:CE:45:FA:6B:A5:92:E5:4A:34:40:AD

but when you build in Android Studio a app with this keyStore you will receive that: $keytool -list -printcert -jarfile app-release.apk will show: SHA1: 15:C3:B6:FB:B0:9B:21:DC:85:D6:04:FA:62:44:EA:F7:3D:85:FD:F8

like image 911
user2013449 Avatar asked Feb 19 '16 20:02

user2013449


2 Answers

you need to provide a keystore having that sha1 key while signing the apk like this

like image 60
Max Avatar answered Sep 21 '22 13:09

Max


Sometimes other apps change your keystore number - e.g. Unity does that. Its not illegal, its just Unity thinks your keystore belongs to itself and writes over the SHA1 number.

Solution: store your keystore safely in an email or something.

like image 24
Steve12345 Avatar answered Sep 25 '22 13:09

Steve12345