Steps to do before:

If you haven’t created the API project yet, click CREATE PROJECT. Give the name of the project and click Create.

Note down the project number. You will use the project number as sender ID in the registration process.

In the sidebar on the left, click APIs and auth. In the displayed list of APIs, turn the Google Map Android API toggle to ON.

In the sidebar on the left, click APIs and auth and Credentials.

Click CREATE NEW KEY and select Android Key.

we need to generate SHA-1 fingerprint using java keytool. Open your terminal and execute the following command to generate SHA-1 fingerprint. Please Note: We need to generate two separate SHA-1 fingerprint i.e one for debug keystore and another one for release keystore. In this tutorial, i’m explaining only on debug keystore and password is ‘android‘ for all debug keystore.

On step 6, a popup window asking the SHA1 and package name. Enter your SHA 1 and your android project package name. And note down the API key which required later in our project.