I am using Google Maps V1 API key. If i Itaking the apk from bin folder, the Google Maps will shown in application. But if I export the project and deploy the exorted apk the google maps do not show in the application. If anybody knows the reason, kindly share your thoughts. Thank you.
-
1You need to use different api keys if your apks are signed with different keys (production vs debug) – Ken Wolf Jun 07 '13 at 07:12
-
can you elaborate this??? – Arunraj Jeyaraj Jun 07 '13 at 07:14
-
elaborated in an answer below – Ken Wolf Jun 07 '13 at 07:18
-
It is happening due to you added *debug SHA1* key on google(SHA-1 certificate fingerprint), So please create SHA1 for *release* mode and put it on google(SHA-1 certificate fingerprint), for more info **Kindly have a look on this video How to create SHA1 for release** https://youtu.be/g75cZXjmuj8 – Dharmbir Singh Feb 14 '17 at 11:00
3 Answers
When you develop and run an application locally, you are actually signing it with a debug key.
When you export, you are signing it with a different, production key.
Google Maps requires your api key to match the key you sign your app with. So you will need 2 different api keys depending on whether your apk was made via debug key (copying it from "bin") or production (exporting).
What's happening to you is when you export your app, the key is not matching what Google Maps API thinks it should be, so it's not working.
Read more about signing apps here.

- 23,133
- 6
- 63
- 84
-
Still I am not able to see the map in my application. Is the problem of V1 api key? – Arunraj Jeyaraj Jun 10 '13 at 15:09
-
@Arun I'm not sure, but google maps v1 was deprecated in December 2012. If it were me I would use the most up to date API. – Ken Wolf Jun 10 '13 at 15:13
-
Besides, it seems you can't get a new API key for V1 anymore so I'm not sure how you are testing against your production key... – Ken Wolf Jun 10 '13 at 15:18
-
1I did nt able to get production key. If u having any steps about how to get production key, kindly share with me. In v2 also the same prob occuring for me. – Arunraj Jeyaraj Jun 18 '13 at 12:14
Please follow these steps to get Release SHA1
Find your .jks path which is used while creating signed apk.
Ex:
/Users/dharm/Documents/Android/test.jks
Copy your jks file name and put in the end of line number 3
Ex:
test.jks
Open your terminal and enter this command keytool -list -v -keystore "keystorepath" -alias "keyalias"
Ex: keytool -list -v -keystore /Users/dharm/Documents/Android/test.jks -alias test
When you will press enter it will ask for Enter keystore password. So please enter your key store password.
If you do all the steps successfully then you will get entire information of this certificate(key store).
Ex:
MD5: D2:52:A1:7C:14:9F:D5:DD:64:35:E2:3F:74:CA:C5:E7
SHA1: D3:32:AA:09:81:71:50:D2:47:20:43:B2:13:A2:D5:55:4B:A7:DC:3C
SHA256: 27:8A:84:C5:C3:CE:98:47:A7:73:E2:87:91:5E:5A:A2:F4:B8:D4:D4:0E
Now you can put this SHA1 key on google console(
SHA-1 certificate fingerprint
).
Hope it will help you.
For Video Kindly have a look on it
https://www.youtube.com/watch?v=g75cZXjmuj8&feature=youtu.be

- 17,485
- 5
- 50
- 66
-
Please don't add [the same answer](http://stackoverflow.com/a/42220160/4687348) to multiple questions. Answer the best one and flag the rest as duplicates. See [Is it acceptable to add a duplicate answer to several questions?](http://meta.stackexchange.com/q/104227/347985) – FelixSFD Feb 14 '17 at 07:34
-
**Kindly have a look on this video How to create SHA1 for release** https://youtu.be/g75cZXjmuj8 – Dharmbir Singh Feb 14 '17 at 11:00