You can generate SHA-1 and SHA-256 keys from your Android project using the VS Code terminal and the Gradle wrapper. These keys are required for specific Firebase services like Google Sign-In and Phone Authentication.
Prerequisites
- You must have the Java Development Kit (JDK) installed and configured in your system’s environment variables, as this provides the
keytoolutility. - Your project should contain an Android application structure.
Step-by-Step Guide
1. Open Your Project in VS Code
Launch VS Code and open the root directory of your project (e.g., your Flutter project folder).
2. Open the Integrated Terminal
Open the terminal in VS Code by going to the top menu: Terminal > New Terminal, or use the shortcut Ctrl + (backtick).
3. Navigate to the Android Directory
In the terminal, change your current directory to the android folder of your project:
bash
cd android
4. Run the Gradle Signing Report Command
Execute the Gradle command to generate the signing report, which includes the SHA keys.
- For Windows, use the following command in the VS Code terminal (which typically uses PowerShell by default):powershell
.\\gradlew signingReport - Alternatively, for other terminals (like Git Bash or if configured differently):bash
./gradlew signingReport
5. Retrieve the SHA Keys
The command will run and output the report in the terminal. Look for the SHA1 and SHA-256 fingerprints under the debug variant (or the release variant if you have configured one).
> Task :app:signingReport
Variant: debug
Config: debug
Store: C:\Users\User\.android\debug.keystore
Alias: AndroidDebugKey
...
SHA1: **54:B0:BC:D6:D6:B4:C3:51:88:E9:20:62:56:CD:23:2D:A7:C0:0F:FD**
SHA-256: **80:BF:B3:A8:0D:D6:D9:7C:C8:5F:61:32:22:6B:EA:D1:51:03:8D:1H:5E:0F:F7:0B:G3:56:1DD1:D1:3B:DB:FA**
Valid until: ...
6. Add the Keys to Your Firebase Project
- Go to the Firebase Console and select your project.
- Click the gear icon (Project settings) in the top-left menu.
- In the “Your apps” card, select your Android app.
- Click the “Add fingerprint” button.
- Paste the copied SHA-1 key (and optionally the SHA-256 key) into the field and click Save. You may need to download the updated
google-services.jsonfile and replace the existing one in yourandroid/appdirectory.

[…] are updated Flutter interview questions and answers for 2026, covering beginner → advanced → architecture → performance → testing → deployment.These are aligned with real […]
[…] is a beginner-friendly, step-by-step guide to creating a PDF app in Flutter, including complete source code.This example shows how to generate a PDF and preview it inside the […]
[…] a clear, step-by-step guide to add a sitemap for a WordPress website in Google Search Console (GSC) […]
[…] Add the release SHA-1 […]