1. Are you ready for the Galaxy S20? Here is everything we know so far!

Plz HELP!! Google Maps still display a GREY GRID in Android Emulator

Discussion in 'Android Development' started by hakerjack, Oct 24, 2010.

  1. hakerjack

    hakerjack Lurker
    Thread Starter

    So I've read dozens of similar post on the web but none of them solve my problem. I just simply followed the tutorial on Android official website that creating a GoogleMap view, but I failed to display the map in the emulator but grey grids and blocks instead. I'm using my own Google API key in this case; the zoom function works fine, just I can't get the real map data through my code.

    The following are my code and I highlight the lines you might think are essential for working correctly in this case.

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"


    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application android:icon="@drawable/icon" android:label="@string/app_name">

    <uses-library android:name="com.google.android.maps" />

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


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


    package net.learn2develop.GoogleMaps;

    import android.os.Bundle;

    import com.google.android.maps.MapActivity;
    import com.google.android.maps.MapView;

    public class MapsActivity extends MapActivity {
    /** Called when the activity is first created. */

    MapView mapView;

    public void onCreate(Bundle savedInstanceState) {

    mapView = (MapView) findViewById(R.id.mapView);


    protected boolean isRouteDisplayed() {
    return false;


    I found the default debug keystore eclipse is using is the one being auto-generated, not the one I used for acquiring my API key. Is that might be the problem?

    Anyone who runs into the same problem before please helps me out!

    1. Download the Forums for Android™ app!


  2. dioni87

    dioni87 Newbie

    Try to generate the md5 by keytool from your java jdk...
    run cmd->keytool
    -list -alias androiddebugkey -keystore "Location of the keystore" -storepass android -keypass android

    My friend have the same problem with u because he wrong inserting api key...

    Hope this help u bro
  3. hakerjack

    hakerjack Lurker
    Thread Starter

    Hi dioni87, I believe I did generate the md5 by using the keytool under java/jdk***/bin folder, and I have my keystore file ("which named ".keystore" by default) located under my workspace folder. Is that a matter of where you keep your keystore file at?

    Also could you explain those command at above you suggested me to type in? I'm not really good at command prompt...

  4. dioni87

    dioni87 Newbie

    the command above explains how to retrieve md5 fingerprint from cmd...use command under keytool...

    i'm copy the keystore from .android folder to C:\android to simplify the writing in the command prompt.

    Can you explain me how do you get the md5 certificate?
    Im also working on a map...
  5. dioni87

    dioni87 Newbie

    My friend is also experiencing the same problem with you, and I told him to repeat the decision-md5 fingerprint with the way above, and the result map appears.

    If the application runs well on emulator but it does not appear on the map means the map was not referring to the google well ...

    sorry if my language a bit difficult to understand
  6. hakerjack

    hakerjack Lurker
    Thread Starter

    Thanks, I can understand, and I solved the problem by using the Google debug key and it worked. Since I design my application for the research and won't go for release it is fine for me to use the debug key. I'll probably try the way you suggested some day. Thank you!:)
  7. Kalthasar

    Kalthasar Lurker

    I had the same problem just now, and also fixed it by switching to using a debug certificate.

    Anyway, I've gone through the rest of that tutorial, and I can't get the overlay objects that are created in that tutorial to display. Any ideas?
  8. yumison

    yumison Lurker

    i had it ,too.
    this is my cmd prompt&#65306;c:\Program Files\Java\jdk1.6.0_24\bin>keytool -list -alias androiddebugkey -keystore "C:\Users\y\.android\debug.keystore" -storepass android -keypass android
    i also got the fingerprint(md5) and went to the website (which is asking for Android Maps API Key) to receive the api key.
    but it still appers grid without the map!!!
    Does anyone know how to let the map appear?i'm so confused about it. thank you!
  9. stevetiger

    stevetiger Lurker

    I just spend 5 hours on this and still couldn't figure out the problem. I generated 4 different keystore and still see empty grid.

    I just wonder where should I put the keystore at?
    What is debug key? I just want to see the sample app to work.



Share This Page