Select the form factors you need for your app. If you’re not sure what you need, just select Phone and Tablet. Then click Next.

Select Google Maps Activity in the ‘Add an activity to Mobile’ dialog. Then click Next.

Enter the activity name, layout name and title as prompted. The default values are fine. Then click Finish.

Now Android Studio will start gradle and build your project. This may take a few of second to build your project. When the build is finished then Android Studio will opens the google_maps_api.xml and MapsActivity.java files in the Editor.(Activity name can have different name but it will be only what name you are given in setup wizard).

3. How to Google Maps API Key: Now your application will require an API key to access the Google Map servers. This key is free and you can use this key in your any of Google map api project. You can get Google Maps API key in following steps.

Follow the instructions to create a new project on the console. If you have already created an API project you can select that.

Create an Android API key for your console project. You can create API key by using as given steps:
a. Click on Credential, It will list out all your created credential and Create credential option.
b. Choose Create Credential option, when you click on Create credential it will prompt to select API key option from given options.
c. When you click on API key, it will further prompt you for choose appropriate option.
d. Choose Android key option in given prompt dialog.
e. As soon as you click on Android key it will ask you the package name of project and sh1 key of your pc that is created from you keystore file with signed or debug keystore file.
You can get SH1 key by using given command from command prompt or terminal.keytool -list -v -keystore mystore.keystore

Copy the resulting API key, go back to Android Studio, and paste the API key into the <string> element in the xmlfile.

Note: For using the service of Google Map into you Android project you must have enabled the Google Map Api from Google API Console page. Your app will not be able to access Google Map until you did not enabled the Google Map API for Android.

Best way to see your app in action is Run your app in Android device. You can also use Android Emulator as alternate of it. Your android phone should have developer option enabled.

Build and Run your app

In Android Studio you can run your app by using Run menu option. You can also use play button icon to Run your app. When you play or run your app it will prompt you to select device. You can choose one of the following option:

Select your Android phone that you have connected with Computer or

You can select Android Emulator radio button and choose available or created virtual Android emulator.

Click on Ok, Android Studio will start gradle to build your app and display to corresponding results on a device or in Emulator. It can take couple of minute before open the app. You should able to see corresponding result on Google map with a pin.

Still facing any issue with Google Maps? Or want to be in touch with us? Contact us: