-1

I try to make sample google map project from this tutorial. It's fine when I try this on android studio emulator but on my device it just shows a gray view with google company mark.

Of course I read a ton of articles like this.

But I can't troubleshout where my problem is? Thanks

enter image description here

Community
  • 1
  • 1
farshadto
  • 21
  • 4

2 Answers2

0

You should register your app to console google website to get API Keys to put it on your xml file. This is the most common error that the map doesn't show. API Keys are not correctly manifested.

MuTiny
  • 261
  • 1
  • 7
  • 23
0

generate signed apk

So you were wrong. You have to create 1 more key on Google Console for "release version" (singed apk) 'cos it is different than "debug version" which you install on emulator.

This answer on what you provide in your question will solve your problem: https://stackoverflow.com/a/30559898/4316327

First, switch to Project view by using the dropdown in the upper left of the Project Explorer. Then, expand app/src/, and you will see subfolders debug and release. Under there, you should see two separate google_maps_api.xml files under debug/res/values and release/res/values.

Paste your "release version" key to google_maps_api.xml inside release folder.

If that folder is not exist, create one like debug folder.

Community
  • 1
  • 1
Harry T.
  • 3,478
  • 2
  • 21
  • 41
  • I made another api key with my sha-1 and paste that in both xml but it still didnt work.maybe i should wait 5 minute. – farshadto Jan 19 '17 at 03:01