0

I made an app with google map.

I just found out that there are two modes, debug mode and release mode. I set SHA for release mode and it did work. But my debug mode was blank. (I changed my computer. The release one is fine, I uploaded it this morning. But I can do nothing with debug mode.) I've changed key from debug and release, added another line in same API key with release, added new key for debug. But nothing has happened yet.

How could debug mode to work?

What I tried:

  • add sha1 value
  • add new API key and change a key on debug mode google_maps_api.xml
  • add code line on 'build.gradle; app' in build type as release&debug

But nothig has worked... I almost lost all of my hair because of this issue... (take it out when I'm in considering seriously...) Please help me...

Edd
  • 1,350
  • 11
  • 14
dalami0i
  • 25
  • 8
  • I had a bug like that, check your package in the Developer Console. – Anton Shkurenko Mar 23 '17 at 08:04
  • @AntonShkurenko bug.... hahaha.... anyway could you explain more detail...? how could I check the package and which kind of issus I can find out and chnage? Sorry I'm new commer in android... I don't know well.... – dalami0i Mar 23 '17 at 08:10
  • When you create key in your developer console in google, you have to copy your app package. If you used quick link in the generated file it could add some wrong info to your package, check that it equals to yours – Anton Shkurenko Mar 23 '17 at 08:43
  • Thank you guys, I fixed it. And it looks it caused by several SHA-1 saved with last computer SHA-1 values. I deleted keys for this package saved by last computer and it works! If there are anyone who save several SHA-1, be sure to leave only each debug & release keys.(One for debug, one for release) – dalami0i Mar 23 '17 at 11:22

3 Answers3

0

I am not sure I understood you well, but it looks like you do not have appropriate API keys set in the appropriate places. Do you have them in these locations?

enter image description here

And both debug and release SHA-1 should be added into Dev Console:

enter image description here

Bozic Nebojsa
  • 3,606
  • 1
  • 19
  • 17
  • Hm... strange... maybe to try (if you already didn't) to regenerate debug key in Dev Console? – Bozic Nebojsa Mar 23 '17 at 08:09
  • I've tried... just I wonder, I've changed my computer. So now should I change all of my SHA-1 which I enrolled as of last computer? SHA-1 would be different. right? – dalami0i Mar 23 '17 at 08:18
0

You have to add SHA-1 signature for both release and debug keys

As i understand from you, you have already added the SHA-1 for release key, so you should do the same for debug key!

Atef Hares
  • 4,715
  • 3
  • 29
  • 61
  • Thank you for your answer.. I added and delete several times for debug key.. But I wonder how could it sperate from release and debug? Same package name and same SHA-1, isn't it? – dalami0i Mar 23 '17 at 08:17
  • No, they are not having the same SHA-1 !, they are different keys!, unless you are using the same key! – Atef Hares Mar 23 '17 at 08:18
  • Thank you... I didn't recognized even I check release key.. Anyway I added two SHA-1 in same package name... but only release works fine... hahaha.... – dalami0i Mar 23 '17 at 08:51
0

You Can add both debug and release mode SHA- 1 key with the same package name While creating API key . and varify the API key what you are using in your project.

Jordon
  • 191
  • 1
  • 12