1

I'm currently working on an app that uses the Google Maps API v2. But the MapView only displays a grey background, the Google logo and the zoom-buttons.

Here are the error messages:

10-27 10:50:25.309: D/REQUEST(18335): Connection opened to:https://clients4.google.com/glm/mmap/api
10-27 10:50:25.309: D/REQUEST(18335): Open Connection
10-27 10:50:26.239: D/REQUEST(18335): DRD(24): 62|147
10-27 10:50:26.239: D/REQUEST(18335): Close
10-27 10:50:26.239: D/REQUEST(18335): Error processing: com.google.maps.api.android.lib6.b.d@409cf570 not retrying
10-27 10:50:26.239: D/REQUEST(18335): Retrying: com.google.maps.api.android.lib6.c.au@409b25b8

And another:

10-27 10:49:49.309: E/REQUEST(18335): In Error Mode
10-27 10:49:49.319: E/Google Maps Android API(18335): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

My Manifest does contain my API key and various permissions:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.hobbit.xmltest"
    android:versionCode="1"
    android:versionName="1.0" >

    <permission
        android:name="de.hobbit.xmltest.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="de.hobbit.xmltest.permission.MAPS_RECEIVE" />

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="8" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- Required to show current location -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />



    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

         <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="SOMEKEY" />

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".SingleActivity"
            android:label="@string/title_activity_single" >
        </activity>
    </application>

</manifest>

I hope someone can find my mistake.

Thanks.

Terry
  • 989
  • 8
  • 29
Hobbit9797
  • 35
  • 7

1 Answers1

1

I used the wrong keystore...

Instead of using the debug keystore, I used my actual keystore.

To access the debug keystore in eclipse

1.Go to Window->Preferences->Android->Build

2.Copy the SHA1 fingerprint

3.Generate an API key in the Developers Console using the debug keystore

Hobbit9797
  • 35
  • 7
  • This saved my day. Just wanted to add info for Android Studio users: you can access debug keystore at~/.android/debug.keystore. To read sha1, the following command can be used (assuming it is run under .android folder): keytool -list -v -keystore debug.keystore – NeviQ-OR Dec 31 '14 at 12:38
  • how i can change gray color ? – Тони Aug 09 '20 at 15:09