How to get SHA1 code in new version of android studio 4.2?

49.5k Views Asked by At

Before this update we can get SHA1 code from Gradle but now it's look like it's changed.

enter image description here

15

There are 15 best solutions below

1
On

Try using this command line in AndroidStudio Terminal

./gradlew signingReport

0
On

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.

enter image description here

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

enter image description here

0
On

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

2
On

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

2
On

Fixed this by doing this: Check here

  1. File
  2. Settings
  3. Experimental
  4. Unchecked the 'Do not build gradle task list during gradle sync' and click 'OK'
  5. Go to file
  6. Sync project with Gradle files
  7. You will see the option on Signing reports under: Gradle -> Tasks ->Android -> Signing Report.

8.Check the image below Here

1
On

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

1
On

Another possible gotcha: make sure your Run output is visible. You may have to expand the Run output screen from right to left, like so:

Before     After

3
On

Option 1 :

1. Open Gradle window from the right side and click on Execute Gradle task icon.

enter image description here

2. Add signingreport beside the "gradle" and press Enter. enter image description here

Option 2 :

  • Open Terminal in android studio, type ./gradlew signingReport and press Enter.

enter image description here

0
On
  1. Double shift
  2. You add 'gradle'
  3. You look for the option 'Sync Project with Gradle Files'
  4. Click on that option
  5. Enter the gradle section again and it will be generated

Greetings! :]

Example

0
On

Step 1: Click Execute Gradle task

enter image description here

Step 2: Type : "signingreport" and Enter

0
On

here

Double click it and you'll get your MD5, SHA, etc.

0
On
  1. Open your project in Android Studio
  2. Click on Gradle tab on the right enter image description here
  3. Click on the elephant Execute gradle task enter image description here
  4. In the popup that appears, type signingreport enter image description here
  5. Wait and check the run tab. You will see the SHA1
1
On

In my case instead of "./gradlew signingReport", "gradlew signingReport" solved my issue

1
On

Click on Double Shift on android studio

Enter "Run anything"

Now enter "gradlew signingReport"

Enter

0
On
  1. Click on the gradle. Top right on the Android Studio. ...
  2. Now click on icon as seen in below picture. A new searchable windows/screen will open.

enter image description here

  1. Now type,gradle signingreport and press Enter to start generating SHA KEY as seen in below picture.
  2. Your SHA Key will generate as seen in this picture.

enter image description here