0

I am working on google maps in android . google map is opening by using debug.keystore on my local system but issue is that when i build signed apk then google map not show.however i have also generate SHA1 key from my app keystore then generate new api key but still google map not showing please help as soon as possible

  • have you tried app in another devices? – Apurva Mar 25 '15 at 07:20
  • Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. – abarisone Mar 25 '15 at 07:20
  • I also put same question, check if any answer is useful. [Click here][1] [1]: http://stackoverflow.com/questions/28983405/google-map-not-showing-when-make-signed-apk?noredirect=1#comment46469803_28983405 – Rahul Sharma Mar 25 '15 at 07:20
  • yes i have tried app on different devices but still same issue – user2034953 Mar 27 '15 at 13:52

1 Answers1

1

From google docs:

In release mode, you sign your app with your own certificate:

Create a keystore. A keystore is a binary file that contains a set of private keys. You must keep your keystore in a safe and secure place.

Create a private key. A private key represents the entity to be identified with the app, such as a person or a company.

So you don't have to generate a new api key. Just generate a new SHA1 for your private key file. After that you have to add it's SHA1 hash into google maps android api section that you have already generated a api key from google developer console.

Because you shouldn't change your manifest file for 2 api keys. Just you have to add SHA1 hashes for both keys. (debug.keystore and your own key file)

Here's a screenshot:

enter image description here

Sorry for bad censor :)

Sercan Ozdemir
  • 4,641
  • 3
  • 34
  • 64
  • i have also changed in manifest file my google map api key but its not working – user2034953 Mar 25 '15 at 07:24
  • I regenerate Api key from google developer console with my keystore SHA1 and replace API key in manifest file – user2034953 Mar 25 '15 at 07:26
  • As i said you shouldn't change your manifest file you have to use same key that you generated for debug.keystore and your key file. I put a screenshot that how my section looks like. – Sercan Ozdemir Mar 25 '15 at 07:31
  • I try this i create new project and then i generate new google maps API key with debug.keystore and my own keystore file but still map not showing – user2034953 Mar 25 '15 at 08:13
  • Key for Android apps (with certificates) API key: AIzaSyAYC2He_DMFqf_sD8ONEc61tBVsnkgnyiM Android apps: B0:7E:13:03:A1:DA:CD:0A:A7:20:25:E5:10:02:E7:59:66:96:96:6D;honey.finalmaptest D5:FA:9B:43:27:5B:47:DD:63:7F:51:5E:84:59:76:6D:37:28:44:E6;honey.finalmaptest Activated on: Mar 25, 2015 1:07 AM Activated by: malikrashidabbas@gmail.com – you – user2034953 Mar 25 '15 at 08:15
  • how can i see logcat. because my app is downloaded from play store – user2034953 Mar 25 '15 at 16:23
  • when i generate API key by using both debug.keystore and my own app release keystore its works on dubugging mode but not working on signing mode when i build signed apk – user2034953 Mar 25 '15 at 16:26
  • are u adding these keys line by line ? or with a white space ? You have to press ENTER after you type your key into google dev console to type other – Sercan Ozdemir Mar 25 '15 at 21:05
  • yes i adding these keys line by line first write debug.keystore SHA1 and press ENTER then write my own release key SHA1 but still not working – user2034953 Mar 26 '15 at 14:20
  • By using this key google map working perfectly but when i generate signed apk and install on my device then google map not showing . – user2034953 Mar 26 '15 at 14:25
  • i'm pretty sure your release.keystore file and your generated SHA1's are not compatible. – Sercan Ozdemir Mar 27 '15 at 06:04
  • then please tell me how can i test that my release.keystore file and SHA1,s are compatible or not? if a send u my release.keystore can u tell me the compatible SHA1 with my release key – user2034953 Mar 27 '15 at 13:45
  • Are you making your SHA1 by following rules as here : http://stackoverflow.com/questions/12214467/how-to-obtain-signing-certificate-fingerprint-sha1-for-oauth-2-0-on-android – Sercan Ozdemir Mar 27 '15 at 17:21
  • yes i am using android studio and i am following same steps for making SHA1 . first i go to Build then click on Generate Signed apk a dialog window is open then i copy keystore path from dialog window and paste it to command prompt then generate SHA1 – user2034953 Mar 27 '15 at 18:19