Question

I created one small app in which I used Google Maps API v2.

For testing and debugging, I used the default debug keystore that is generated named as debug.keystore.

I generated my SHA key that has to be provided for using maps and generated api key and used in my application. I signed the application using EXPORT wizard in eclipse and am creating my new key store for my app and generating application apk.

But now when I am trying to run this app on device the MAP is not displayed.

As I suspect this is due to new keystore for my app and i have registered my debug keystore SHA key to google console.

What am i doing wrong here and how can i fix it?

Was it helpful?

Solution

While signing an application with different keystore from debug one, you should create another API_KEY using SHA1 generated from your current keystore and register it in Google API Console and use that key for Google Maps. Your maps won't show up,because API_KEY is generated by the current keystore and your package name. Changing keystore file will cause your MapView to shows blank, because SHA1 is different.

So as a final answer, you should repeat all steps to generate an API_KEY for Google Maps with new SHA1.

Edit: There are two options which you can use to create SHA1 from keystore file.

  1. keytool -list -v -keystore <path_to_your_keystore> will give you SHA1.
  2. Using Eclipse if you try to sign your app with your keystore, at the end before saving your .apk file it will shows you SHA1 and MD5 generated from your keystore. I think it was the second time when you try to sign apk.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top