Consider the following steps if none of the solutions work to get the SHA-1 key. Working solution
1. File-> Create-> Google-> Activity on Google Map . After creating one dialog box, you will get all the details, such as package name, SHA key, etc.
Sagar source share