- Learning Android Google Maps
- Raj Amal W.
- 358字
- 2021-07-09 21:54:29
Generating the SHA1 fingerprint
Let's learn how to generate the SHA1 fingerprint on different platforms one by one.
Windows
The keytool usually comes with the JDK package. We use the keytool to generate the SHA1 fingerprint. Navigate to the bin
directory in your default JDK installation location, which is what you've configured in the JAVA_HOME
variable, for example, C:\Program Files\Java\jdk 1.7.0_71
. Then select, File | Open command prompt.
Now, the command prompt window will open. Enter the following command, and then hit the Enter key:
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
You will see an output similar to this:
............. Valid from: Sun Nov 02 16:49:26 IST 2014 until: Tue Oct 25 16:49:26 IST 2044 Certificate fingerprints: MD5: 55:66:D0:61:60:4D:66:B3:69:39:23:DB:84:15:AE:17 SHA1: C9:44:2E:76:C4:C2:B7:64:79:78:46:FD:9A:83:B7:90:6D:75:94:33 ............
Next, note down the SHA1 value, which is required to register our application with the Google Developer Console:

The preceding screenshot is the typical output screen that is shown when the command is executed.
Linux
We are going to obtain the SHA1 fingerprint from the debug.keystore
file, which is present in the .android
folder in your home directory. If you want to install Java directly from PPA as given in Chapter 1, Setting Up the Development Environment, open the Terminal and enter the following command:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
This returns an output similar to what we obtained in Windows as shown previously. Note down the SHA1 fingerprint that we will use later.
If you've installed Java manually, you need to run the keytool from the keytool location. You can export the Java JDK path as follows:
export JAVA_HOME={PATH to JDK}
After exporting it, you can run the keytool as follows:
$JAVA_HOME/bin/keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
This command produces the following output:

Mac OS X
Generating the SHA1 fingerprint on Mac OS X is similar to Linux. Open the Terminal and enter the following command. It will show an output similar to what we've obtained in Linux. Note down the SHA1 fingerprint that we will use later:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
- 零起步玩轉掌控板與Mind+
- Visual C++數字圖像模式識別技術詳解
- Python語言程序設計
- Python 3破冰人工智能:從入門到實戰
- Reactive Programming With Java 9
- 深入淺出RxJS
- Active Directory with PowerShell
- 第一行代碼 C語言(視頻講解版)
- Laravel Application Development Blueprints
- 微信小程序開發邊做邊學(微課視頻版)
- Mastering ArcGIS Server Development with JavaScript
- Swift 2 Design Patterns
- Web程序設計與架構
- 大話C語言
- Mastering Magento Theme Design