This is Quickest way to get SHA-1 in Android studio - Follow steps below:
./gradlew signingReport
The SHA-1 for both debug and release build types will be displayed, along with other details like SHA-256 and MD5.