Google Maps Android API v2 - Debug key API is not working

0

I'm trying to use the Google Maps Android API v2 in my Android application. It was running on another developer's computer, with debug.keystore of it, but with my debug.keystore (located at C:\Users\Meu Usuário\.android\debug.keystore ) is not working.

The Google Maps Android API v2 is enabled and I have already created an API Key following the normal steps:

  • Run the command keytool -list -v -keystore debug.keystore to get the string SHA1;
  • Use the SHA1 string to create an API key in Google Developers Console following the format stringSHA1;br.com.meuapp ;
  • Include the API key in my AndroidManifest.xml :

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />
    
    <permission
        android:name="br.com.meuapp.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
    <uses-permission android:name="br.com.meuapp.MAPS_RECEIVE"/>
    
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    
    <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true"/>
    
    <application
        ...
    
        <uses-library android:name="com.google.android.maps" />
    
        <meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    
        ...
    
        <!-- Debug API key -->
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSy*********************************"/>
    
    </application>
    

  • However, nothing is solving (the map does not appear) and LogCat always shows the error below:

    06-02 17:25:51.601: E/Google Maps Android API(5354): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
    

    Device connectivity is OK.

    I've checked and re-checked the generation of the API key , the value of the string SHA1, etc.

    In order to allow compatibility with Android versions below 3.0 I am using the Compatibility APIs ( SupportMapFragment , etc).

    The version of my Google Play Services library is 4323000 .

    I'm using Eclipse.

    Does anyone know how to solve it?

        
    asked by anonymous 02.06.2014 / 22:44

    2 answers

    0

    Strangely, I turned on the computer and the test device today and the map worked. I think this reboot was missing or it would be time for the API Key to be accepted by Google's servers. Anyway the problem is solved. Thanks to those who were willing to help.

        
    03.06.2014 / 13:35
    0

    I think I know what's wrong with your map.

    There are two SHA1 strings that are generated, one for apk and one for use when the app boots with the IDE.

    What you need to register in google is the IDE you can find in ADT under Window - > Preferences -> Android - > Build.

        
    03.06.2014 / 13:23