Maps Android Studio is not displayed


I have been learning how to use Maps in android studio. The project compiles OK, but when I open the app on the mobile you can not see anything, just the word google on the bottom.

already create and add the api key. What may be happening?

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    android:required="true" />

    <activity android:name=".MainActivity">
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
    <activity android:name=".SecondActivity">
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />

        android:value="@integer/google_play_services_version" />
         The API key for Google Maps-based APIs is defined as a string resource.
         (See the file "res/values/google_maps_api.xml").
         Note that the API key is linked to the encryption key used to sign the APK.
         You need a different API key for each encryption key, including the release key that is used to
         sign the APK for publishing.
         You can define the keys for the debug and release targets in src/debug/ and src/release/. 
        android:value="AIzaSyDAEkJrbbqVfGLD7tWhksHRceh8Wqi-j8o" />


asked by Alejandro Echeverria 01.04.2016 в 17:15

3 answers


If your map is not displayed correctly, it is important to check within LogCat , for example you could have this message:


Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists:
    API Key:
    Android Application (;):   10: 6D: D9: 34: 96: A6: 1C: 5A: 45: 5F: 2C: C5: F7: FA: A5: E0: A2: D3: 58: E0; com.pollitos.testapplication

To enable the LogCat : from the menu: Tools - > Android - > Android Device Monitor and there you select the tab "logCat "where information related to your application is displayed.

The main reason why the map is not displayed is because it does not have the correct KEY API or the API is not enabled.

Reviewing the steps again to correctly configure Google Maps in an Android application:

We go to the development console to enable the API de Google Maps


We look for Google Maps Android API and go to the option " Credentials "

We select: Create Credentials > API KEY > Android Key

We add a description and then add the application package and the certificate SHA-1 that appears in the LogCat , it is important to add the correct package since the permissions to visualize the map are assigned depending on the package and keystore used (certificate SHA-1 ).

When you create the Key API with these values you will get a dialog with the value of your KEY API to configure in your AndroidManifest.xml

when setting this value within your Manifest.xml

 <!--Google MAP API key-->
        android:value="AIzaSyAx7OiP9d4py5lWMOFfIrR63a9K-ikLTtw" />

You can easily upload Google Maps to your application:

It is very important to also comment, that the API KEY depends on the Keystore with which the application is generated. In my case I have a KEY API generated from SHA-1 of Kesytore debug and other API KEY generated from Keystore with which the application is signed in production.

  • If you are working in development, get the SHA-1 from the development Keystore located at:


Register it, get the KEY API and configure it in your project.

  • In production you must obtain the SHA-1 from the Keystore with which the application is signed for the Google Playstore, register it, obtain the KEY API and configure it in the project.
answered by 01.04.2016 / 19:35

Preparations for Android Studio

Following the steps of the Android Maps Guide I have been able to extract the prerequisites to use the Google Maps service.

Install the Google play Services of the SDK Manager Create apikey of Google Places API for Android in the console: console developer

Add the dependencies in file app.graddle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile ''
    compile ''
    compile ''

Create values / google_maps_api.xml

    <string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
        <!-- código de la APIKEY

apply permission ACCESS_FINE_LOCATION in file Manifest.xml to be able to use google maps

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

And define new activity

    android:value="@string/google_maps_key" />


Create the layout layout / activity_maps.xml

<fragment xmlns:android=""
    tools:context="" />

The activity where you want to use the google maps element must inherit from FragmentActiity and load the interface OnMapReadyCallback

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {

    private GoogleMap mMap;

    protected void onCreate(Bundle savedInstanceState) {
        // Obtain the SupportMapFragment and get notified when the map is ready to be used.
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()

     * Manipulates the map once available.
     * This callback is triggered when the map is ready to be used.
     * This is where we can add markers or lines, add listeners or move the camera. In this case,
     * we just add a marker near Sydney, Australia.
     * If Google Play services is not installed on the device, the user will be prompted to install
     * it inside the SupportMapFragment. This method will only be triggered once the user has
     * installed Google Play services and returned to the app.
    public void onMapReady(GoogleMap googleMap) {
        mMap = googleMap;

        // Add a marker in Sydney and move the camera
        LatLng myLocation = new LatLng(13.0810, 80.2740);
        mMap.addMarker(new MarkerOptions().position(myLocation).title("Marker in Sydney"));
                new LatLng(myLocation.latitude, myLocation.longitude), 11.0f), 1500, null);

answered by 06.04.2016 в 18:34

I have the same problem, but it does not charge me when the device has only GPS enabled, when the "Location mode" is in "high precision mode" with networks and Wifi, the map loads perfectly .. That was not your problem but I'll leave it in case someone is going through the same thing as me.

answered by 15.11.2017 в 18:21