Yugal Kothari
Yugal Kothari

Reputation: 13

Error- Could not contact to google servers

With reference to previous error Link1

I want able to move one step ahead. But now i am facing two new errors.

04-05 14:24:27.156: E/Google Maps Android API(32366): Authorization failure.
04-05 14:24:27.966: E/Google Maps Android API(32366): Failed to load map.  Could not contact Google servers.

This is only important content from my Manifest.xml file

<permission
        android:name="com.example.task.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
<uses-permission android:name="com.example.task.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

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

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

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="_MY_API_KEY_GOES_IN_HERE_"/>
    </application>

</manifest>

I have referred to the link Link2 Link3

Upvotes: 1

Views: 542

Answers (1)

Monika
Monika

Reputation: 431

Make sure all below mentioned points are taken care: 1) Wrong service was enabled. Make sure the "Google Maps Android API v2", not "Google Maps API v2" is enabled and re-generate the API key.

2) Add the following elements to your manifest. Replace com.example.mapdemo with the package name of your application.

3) Use of correct certificate and key. Release certificate, which WILL NOT WORK during debugging when you run the app on my phone. You have to use the debugging keystore certificate fingerprint instead.

Upvotes: 1

Related Questions