The best solution for generating SHA1an SHA-1 key for androidAndroid is from android studioAndroid Studio.
Click on Gradle on the far right side :

Click on the refresh icon, and you will see the name of the app :

Click on the TasksTasks -> Report Report -> Signing Report Signing Report:

Find the SHA1 KeySHA-1 key on the bottom part in the console :
