Before this update we can get SHA1 code from Gradle but now it's look like it's changed.
How to get SHA1 code in new version of android studio 4.2?
49.5k Views Asked by Krushal Virani AtThere are 15 best solutions below

In Android Studio, go to Build menu -> Generate Signed Bundle / APK
Select your keystore and key alias.
Copy the key store path and the key alias.
Here, the path is /Users/technofreek/Documents/testkeystore
and the alias is key0.
Open terminal and type the command
keytool -list -v -keystore <your keystore path> -alias <your alias>
For this example, here’s the command
keytool -list -v -keystore /Users/technofreek/Documents/testkeystore -alias key0
This will print your SHA1

please goto Tools > firebase, the Assistant tab on your right will open and then choose what feature you want, either authentication, realTimeDatabase etc the click connect to firebase and firbase console will open from where you get to select your project from the list of projects and then it will connect automatically, everything is donw for you, i hope this helps
Thanks

4.2 do not build gradle task by default.
you kan open it in file > settings > experimental, uncheck "do not build gradle task list during gradle sync", then sync project with gradle files

Fixed this by doing this: Check here
- File
- Settings
- Experimental
- Unchecked the 'Do not build gradle task list during gradle sync' and click 'OK'
- Go to file
- Sync project with Gradle files
- You will see the option on Signing reports under: Gradle -> Tasks ->Android -> Signing Report.

4.2 do not build gradle task by default. you kan open it in file > settings > experimental, uncheck "do not build gradle task list during gradle sync", then sync project with gradle files
yes its 100% working

Click on Double Shift on android studio
Enter "Run anything"
Now enter "gradlew signingReport"
Enter
Try using this command line in AndroidStudio Terminal
./gradlew signingReport