Here is how to get it :
In Eclipse, if you go to Windows ->Preferences -> Android -> Build.
SHA1 certificate fingerprint
-
31-07-2022 - |
Pregunta
I am trying to make an app that can communicate with Google Cloud Messaging. I have looked at some tutorials and read a lot of stuff, but it all skips one point. When configuring an Android Key for API Project it asks for a SHA1 certificate fingerprint.
How do I find this (I have eclipse and windows 7)?
Any help would be appreciated.
Solución
Otros consejos
You can get SHA1 from here using the steps and Keystore Password with be "android".
if you are working in android (Google drive apps, Google Map apps), and you need SHA1 or MD5 then follow this step to get your SHA1 and MD5.
- Open Eclipse
- Windows-->Preferences-->Android-->Build (Here you will got a path to your "debug.keystore" Copy this path.
- Find out where is your jdk (like in my system "C:\Program Files\java\jdk1.6\bin " Now open TERMINA(cmd) and change the directory to the bin , like c:\ cd "C:\Program Files\java\jdk1.6\bin"
- Now after that copy-paste this code in your terminal
keytool -list -v -keystore "C:\Users\pir fahim shah.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
you can change your "debug.keystore" file address here.
Some snapshot which will show my process
Found debug keystore file on Mac with Android Studio at ~/.android/debug.keystore
keytool -list -v -keystore ~/.android/debug.keystore
- Open Android Studio
- Open Your Project
- Click on Gradle (From Right Side Panel, you will see Gradle Bar)
- Click on Refresh (Click on Refresh from Gradle Bar, you will see List Gradle scripts of your Project)
- Click on Your Project (Your Project Name form List (root))
- Click on Tasks
- Click on android
- Double Click on signingReport (You will get SHA1 and MD5 in Run Bar)
- Check app run console bar
I found a very easy process to find you MD5, SHA-1 fingerprint using Android Studio.
- Run your project
- Go to Gradle Menu (Menu: View -> Tool Windows -> Gradle)
- Go to 'signingReport' in Gradle window. (Your project -> Tasks -> android -> signingReport)
- Run it. (Using double-click or Ctrl + Shift + F10)
- In Run window you will find all info.
The best solution for generating SHA1 key for android is from android studio.
Click on Gradle on far right side
Click on refresh icon and you will see the name of the app
Click on the Tasks -> Report -> Signing Report
Find the SHA1 Key on bottom part in console
For Debug Version of SHA1 key open terminal and enter the following command.
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Note: If you find any error you may need to change path of your debug.keystore file(In my case it is "/.android/debug.keystore").
For Release Version of SHA1 key, first you need to generate signed apk. After that you will get .jks file. Then apply the following command in terminal.
keytool -list -v -keystore ~/.android/release.jks -alias ProjectName
Note: If you find any error you may need to change path of your release.keystore file(In my case it is "/.android/release.keystore").