Finding SHA1 and SHA-256 key for Flutter app in Android Studio on Windows
This is how I found the SHA1 and SHA-256 key of my Flutter app in Android Studio when I was setting up my Firebase project:
- right click on gradlew under android folder of the project folder and click ‘open in terminal’
2. type in the following command :
gradlew signingReport
3.wait for it to load and YAY you’re done! You should be able to see all the signingReports ; scroll to the relevant SHA1 and SHA-256 fields
*if you encounter the errors:
->something along the lines of JAVA_HOME not in PATH , add JAVA_HOME into your environment variables ( I placed it in environment system variables and set its value to the corresponding path where JAVA is installed (I found mine through running flutter doctor -v in my project terminal, then look for JAVA binary under Android Toolchain)
->if you encounter ERROR: JAVA_HOME is set to an invalid directory, reference this link to see if it helps.