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

Viewed 25344

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

enter image description here

13 Answers

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

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

Step 1: Click Execute Gradle task

enter image description here

Step 2: Type : "signingreport" and Enter

Try using this command line in AndroidStudio Terminal

./gradlew signingReport

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

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

  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

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

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. 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

here

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

Click on Double Shift on android studio

Enter "Run anything"

Now enter "gradlew signingReport"

Enter

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

Related