Question

When exporting my apk I've always used the temp.keystore I had and everything was ok - the Google Maps element was working as intended. However the certificate expired (it was only 1 month, so that's understandable) and I couldn't export my apk anymore. Now even if I create a new keystore using a new API key or even a new debug.keystore (with a new SHA key) the Google Maps element is blank.

To sum up:

  • Google Maps worked fine
  • keystore certificate expired
  • can't export with the expired key
  • even with a new key the Google Maps element is blank

Is there something I'm doing wrong?

Was it helpful?

Solution

  • When you are developing app using google-maps-api, you can get sha1 with debug.keystore file. With this fingerprint, you can generate a new debug api-key which you can use on debug mode.
  • But if you will publish your app or export your signed app, you must use release api-key. How to generate this release api-key? It is simple. You should first sign your app and generate your private keystore file. With this keystore file you can get your sha1 fingerprint and then you can generate your release api-key with it. There is no time limit for this api-key. But there is a user limit if you use free google-maps-api.

In this way, i have published 2 apps and they are working well with their api-key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top