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 keytool utility.
  • 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 

  1. Go to the Firebase Console and select your project.
  2. Click the gear icon (Project settings) in the top-left menu.
  3. In the “Your apps” card, select your Android app.
  4. Click the “Add fingerprint” button.
  5. 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.json file and replace the existing one in your android/app directory. 
Categories: Tech Post

4 Comments

  • Flutter interview question and answers for 2026 - Dheeraj Hitech · January 1, 2026 at 6:20 pm

    […] are updated Flutter interview questions and answers for 2026, covering beginner → advanced → architecture → performance → testing → deployment.These are aligned with real […]

    How to create PDF app using Flutter with source code - Dheeraj Hitech · January 3, 2026 at 5:36 pm

    […] 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 […]

    How to add sitemaps for WordPress website in google search console - Dheeraj Hitech · January 5, 2026 at 11:47 pm

    […] a clear, step-by-step guide to add a sitemap for a WordPress website in Google Search Console (GSC) […]

    Leave a Reply

    Avatar placeholder

    Your email address will not be published. Required fields are marked *