Google Maps API Key

Getting Debug Keystore


  1. To get debug keystore simply type this

    For Mac (Terminal):

    keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

    For Windows (Command Prompt):

    keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

    You will see an output below:


  2. Go to Google Console site. Click here and login to your account.


  3. Tap Add a project name. Any name can do then after, press Create button. Wait for it to finish creating the project.


  4. Once it is done, tap Credentials button then select API Key


  5. Then a popup will show the press Close button


  6. You will see the details below. Click the Entry API Key 1 or any name provided as shown in the red highlight below.


  7. Now, select Android Apps. Provide the package name and the SHA1 you generate awhile ago and then tap Save button.


  8. The package name is found inside the AndroidManifest.xml as shown below


  9. The release keystore is used when you will be uploading the APK for playstore. To create a keystore, Open Android Studio, Build Menu > Generate Signed APK a popup will show as shown below.


  10. On the next popup, fill in all textbox. Provide the required information as shown in figure. Your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app.


  11. When you reached at this part, cancel it already since you create the keystore for release.



Getting SHA1 for Release Keystore


  1. Enter the following at a terminal or command prompt:

    keytool -list -v -keystore your_keystore_name -alias your_alias_name

    Replace your_keystore_name with the fully-qualified path and name of the keystore, including the .jks extension.

    Replace your_alias_name with the alias that you assigned to the certificate when you created it.


  2. Once you got the SHA1, paste it by adding a new fingerprint in the Google Developer console



Adding MAPS API KEY to Android Studio


  1. Open the Android Studio project, and locate build.gradle(Module:app)


  2. Paste the MAPS API KEY as shown below. You can use the same API key if you use the same Google project.


  3. The MAPS API KEY found in the credentials page in the Google API Console


  4. Then you are done. Congrats!!


Next >>