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?