How to get SHA-1 key in Android Studio 2.3.1?
Asked Answered
P

4

6

When I try

gradle(Right corner): My_project: app: click on tasks: android: signingReport 

it doesn't give me any key or anything expected. I am not able to get SHA-1 key in Android Studio 2.3.1.

I get this:

Run build   761ms   
Run init scripts    23ms    
Configure settings  1ms 
Configure build 343ms   
Project :   343ms   
Resolve dependencies :classpath 331ms   
Calculate task graph    355ms   
Project :app    352ms   
Resolve dependencies :app:classpath 0ms 
Resolve dependencies :app:_debugApk 78ms    
Resolve dependencies :app:_debugCompile 12ms    
Resolve dependencies :app:_releaseApk   14ms    
Resolve dependencies :app:_releaseCompile   59ms    
Resolve dependencies :app:_debugUnitTestApk 2ms 
Resolve dependencies :app:_debugUnitTestCompile 2ms 
Resolve dependencies :app:releaseWearApp    1ms 
Resolve dependencies :app:wearApp   0ms 
Resolve dependencies :app:_releaseUnitTestApk   1ms 
Resolve dependencies :app:_releaseUnitTestCompile   1ms 
Resolve dependencies :app:_debugAndroidTestApk  17ms    
Resolve dependencies :app:_debugAndroidTestCompile  2ms 
Run tasks   10ms    
:app:signingReport  4ms 

Thanks in advance.

Phile answered 24/4, 2017 at 14:16 Comment(1)
what do you get instead?Beautifully
M
26

Try following this:How to get the SHA-1 fingerprint certificate in Android Studio for debug mode?.

  1. Open Android Studio
  2. Open your Project
  3. Click on Gradle (From Right Side Panel, you will see Gradle Bar)
  4. Click on Refresh (Click on Refresh from Gradle Bar, you will see List Gradle scripts of your Project)
  5. Click on Your Project (Your Project Name form List (root))
  6. Click on Tasks
  7. Click on Android
  8. Double Click on signingReport (You will get SHA1 and MD5 in Run Bar)
  9. You can find it in the log of Gradle Console
Moses answered 24/4, 2017 at 14:26 Comment(1)
Oh Man !!! I didn't notice that Gradle Console. You are right.Thanks Man !!! You saved a lot of time. Thanks again.Phile
O
6

Find signingReport from From Right Side Panel, you will see Gradle Bar

enter image description here

Double Click on signingReport

You can find it in the log of Gradle Console

enter image description here

Olson answered 17/7, 2018 at 10:23 Comment(1)
Great answer, also useful if you need SHA1/256 for something else than Google Maps APIGroan
O
0

Consider the following steps if none of the solution works to get SHA-1 key. Working solution

1. File->New->google->Google Map Activity once created one dialog will appear you will get all the details like package name, SHA key etc.

Otolith answered 15/12, 2017 at 11:25 Comment(0)
L
0

you can just take a new MapsActivity in android-studio and then goto google_maps.api.xml and then you can get SHA-1 key

Livelihood answered 27/3, 2019 at 9:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.