4

I had a working google maps v2 application, but due to certain circumstances, I had to change my debug keystore. I have, of course, added the new SHA-1 fingerprint to the allowed Android device list in my Google API account.

The map no longer displays, only the zoom and center buttons on a grey background appear. The following errors pop in ADB logs :

05-21 18:11:42.903: I/Google Maps Android API(15747): Failed to contact Google servers. Another attempt will be made when connectivity is established.
05-21 18:11:43.093: E/Google Maps Android API(15747): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

I have browsed several similar questions here on stackoverflow, but none seem to solve my own problem.

Here is what I have done/checked :

  • Add the new SHA-1 fingerprint to my original API key allowed Android devices
  • Create a new API key with the new SHA-1 fingerprint
  • Clear application data according to this post
  • Uninstall and install application again
  • Install on a brand new device
  • Check, double check and update Google Play library dependency
  • Check that "Google Maps Android API v2" service is enabled in my Google API account

I'd like to add that my old application version with the original debug keystore still works correctly.

Any help is appreciated. Thanks !

Community
  • 1
  • 1
Alexis
  • 387
  • 4
  • 12
  • I have the same issue, only the signed apk will works for me. – user1940676 Sep 02 '13 at 18:41
  • Interesting, I will give this a try. Thanks. – Alexis Sep 03 '13 at 07:47
  • Why did you create a new API key *and* add the SHA-1 to the existing API key? Sounds like you have a conflict there. – twaddington Sep 04 '13 at 23:29
  • I tried both solutions : (1 - Add the SHA-1 fingerprint to my existing Google API key ; 2 - Create a new Google API key), just to make sure I exhausted all possibilities. – Alexis Sep 05 '13 at 09:53
  • Did you take internet permission in manifest file ? – Jitesh Dalsaniya Sep 06 '13 at 11:48
  • Do you check this links' answer, those may help you. http://stackoverflow.com/questions/16564550/in-version-2-map-view-does-not-show-map and http://stackoverflow.com/questions/16589805/google-map-not-show-any-thing-in-map#993266 – Pradip Sep 10 '13 at 05:53

3 Answers3

1

I had the same issue..

  1. Set your new key on manifest.
  2. Disable automatic build in your IDE.
  3. Delete all resources on your project bin folder.
  4. Clean project.
  5. Build this.

I'ts worked for me.

Give a try.

Igor Morais
  • 645
  • 1
  • 8
  • 13
0

I noticed when i changed my debug key that it took a few hours for the new key to function properly.

ruckc
  • 505
  • 1
  • 6
  • 23
  • Thanks for your input, I had already thought of that and waited a few days but nothing changed. – Alexis Sep 03 '13 at 07:48
0

I had a similar problem and spent a ton of time trying to fix it. Try this:

Rename your debug.keystore file and then do a clean, and then build. this will generate a new debug.keystore. and a new SHA1 fingerprint. Plug that new fingerprint into the api console and try again.

The other thing you can check is to look at the "reports" section of the api console for the project you are trying to access the api from. If you have tried to run your project and have no traffic for that api, chances are either the SHA1 fingerprint or the package name you gave is wrong. In my case it was the fingerprint.

nPn
  • 16,254
  • 9
  • 35
  • 58