0

So I had an Android app up and running on my old computer. That computer experienced tragic technical difficulties, and so I had to nuke it. Luckily I had all my project files backed up. After getting back to a successful build, the Android application in question now posts the following error when starting a maps activity

05-26 10:46:17.259 29771-30465/com.mypack.android E/b: Authentication failed on the server.
05-26 10:46:17.259 29771-30465/com.mypack.android E/Google Maps Android API: Authorization failure.  Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.

Uh oh! So I remember how much of a pain this was to set up, and I look at the text file I wrote to guide me should I ever have issues with it again.

I have both /release/values/google_maps_api.xml and a /debug/values/google_maps_api.xml both with fingerprints and package names listed, as well as a string for the key itself. For simplicity's sake, I'll use the following as the debug credentials

fingerprint: AB:CD:12:34
package name: mypack

I've gone into my google developer console and under the Android Maps API, I've enabled it and added those credentials to an Android API key named mypack key. Under said credentials I've placed the debug fingerprint: AB:CD:12:34 as well as the release key fingerprint and the sha1 keystore fingerprint given by keytool -list -v -keystore mystore.keystore all of which are tied to com.mypack.Android (which is the package name in my AndroidManifest.xml.) Is this too many? I've tried singling out each one - only having one at a time but stil...

no luck!

So what I figure happened was that when migrating my project, the key values under google_maps_api.xml must have been invalidate - in some way shape or form the SHA-1 certificate fingerprints are bad. I'm not sure how to validate the fingerprints, maybe there's a way to regenerate the google_maps_api.xml files for this project?

Csteele5
  • 1,262
  • 1
  • 18
  • 36
  • Try to double check if you follow the steps [here](https://developers.google.com/maps/documentation/android-api/signup) also check this SO question [11703035](http://stackoverflow.com/questions/11703035/invalid-maps-android-maps-api-fingerprint?rq=1) and [7252359](http://stackoverflow.com/questions/7252359/trouble-with-google-maps-api-key?rq=1) if it can help you:) – KENdi May 27 '16 at 08:52
  • Thanks for your comment. I've done both of these (Google maps doesn't accept MD5 keys in its credentials) and neither have worked. Unfortunately cleaning, and rebuilding the project also does not work. I've checked and double checked all the credentials but the maps API is still left not working. It's very hard for me to see what I'm doing wrong when there are so few steps. – Csteele5 Jun 02 '16 at 21:31

0 Answers0