Tuesday, August 20, 2013

Android: Solution for Google Maps API v2 is not working due to authentication issue


If your facing below exception when you’re trying to hit Google map.

I/Google Maps Android API(2470): Failed to contact Google servers. Another attempt will be made when connectivity is established.

E/Google Maps Android API(2470): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

Check whether you have followed Google maps documentation,
If you feel, everything is achieved but still map is not appearing and you're getting above exception then we should check the below mentioned solution.

Solution / Checks:

When you’re facing authentication issue with your application then check two things.
1.     Whether you’re behind the proxy.
2.     Whether you’re debug.keystore file is signed or not.
If you’re using default android debug.keystore then it is not signed.