Search code examples
androidgoogle-playgoogle-maps-api-2

problems with android maps apiv2 after signing apk


I'm having a serious problem

When i build the apk via Eclipse everithing fine and the map is working very well

But when i sign my apk with Eclipse and move the signed apk to my phone the map activity not working, its not collapse it just show gray screen

I don't know what im doing wrong

I made all by using guides and i think everithing is fine

Does it happens to somebody that can help me solve this problem?

I pass the dead line that i should upload my app and i'm really nervous

Please help me.

Thanks for all answers


Solution

  • The maps api key is based on the keystore sha1 hash and the package name. When you sign your apk, the sha1 hash changes (because you are signing with a different keystore).

    Just add the sha1 hash of the new keystore, and the package name to a new line in the Key for Android apps (with certificates) section, under the API Access section in the Google Api Console. It's exlained here as well: https://developers.google.com/maps/documentation/android/start.