Google Maps MapView displays grid, not map - android

I have been messing with this error for several days. When I run my app, I get the MapView to open but the map doesn't display. It only shows a grid that you can move around and zoom in and out.
I have generated two new API keys thinking that it was that, but it still doesn't work. And yes, I do have the internet permission under the manifest file.

Are you definitely using an API key generated from your debug keystore and specifying appropriately in your layout?
If you generate the API key from your own private key then it will not work when you send debug versions to your device, because they are signed with the debug key.
The guide to getting the MD5 of your Debug Certificate.

Related

google maps api key not working v2

I had an android application that utilizes google maps.
I have followed the instuctions and made the app working in debug mode using the debug key.
I have retrieved my SHA-1 key from the debug.keystore found here.
c:\Users\myself\.android\debug.keystore
using
c:\Program Files\Java\jdk1.7.0_03\bin>keytool -list -v -keystore c:\debug.keystore
The map was showing fine whenever I used tethered debug by running the app from eclipse on my test phone (which ran android 2.3.6).
However, after finishing the app, in the published app the map did not show. What was visible were only grey tiles.
I know this is an issue with the API key.
So I created a new key, (and an apk with it) used it to generate a new API key from the google's console. I deleted the apk that was generated with the key, as it had the old ApiKey, and pasted the new api key here.
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:id="#+id/mymap"
android:apiKey="my_api_key"
Then I re exported my project but this time used the same key that I had created the step before as they contained the same SHA-1.
However, still the map does not show and only grey tiles appear.
I have entered my SHA-1 key in the api console in the following way.
18:3E:1D:8C:xx:xx:xx:xx:xx:xx:xx:xx:xx:x:xx:1D:E1:08:32:8E;com.mycompany.mapapp
I tried to revert back to my debug key, but this time the debug app (running from eclipse) also did not show any maps.
my questions are the following.
Is this still the correct method to use? Because in the --https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key -- google used different approach using fragments.
What am I missing ?
Is this method deprecated or should work ?
You're generating an ApiKey for the Google Maps V2, but you are using the v1 MapView com.google.android.maps.MapView.
On the Android Maps V2 API, the key is placed on the manifest, and you use com.google.android.gms.maps.MapView to show the map, using the Google Play Services Library.
I suggest reading the overview section here to learn how to setup your Project with the Google Play Services Library, and looking at the new API Reference here.
If you are developing google maps api. You need to have two sets of map api key. One map api key that is generated by using your SHA1 fingerprint from your debugging keystore, this map api key is to be used when you are debugging your app in eclipse and running it from there. The other map api key is generated by using your SHA1 fingerprint from official or production keystore, this map api key is used when you will signed or publish your app.
I think you are experiencing mismatch of your keys there since the map api key on the manifest is from debugging keystore and you have signed your app with your official keystore.
Also I think you are developing MapView. It is recommended now to use MapFragments now. I have links here that might help you.
Quick Start Guide: https://docs.google.com/document/d/1dFzZT0C782BxLkDIUEb711rmsbMmYPURFV_2Cdb36so/edit?usp=sharing
Trouble shooting thread if you encounter problems with MapFragment or Google Play Services Library:
Unable instantiate android.gms.maps.MapFragment
Also I have answers here in this How to/Error in declaring google-play-services-component that might help you.

Google Maps API testing

I know there are many other topics that have the problem with the Google Maps API displaying a grid instead of the map, and that is the problem I am having as well.
The difference is that I have had mine working before. I followed a bunch of tutorials and signed my application and all of that stuff, but a few days later the map went back to the grid.
I can just generate another release token, but I don't want to have to do that every time the map displays a grid, and the debug key isn't working like it should.
What do you all suggest?
When you signed the build, did you update the key which the Google Maps use?
Because if not you will get a blank map.
You will need to generate a new Google Maps API key with the keystore you used to sign the build and use this for the signed build.
https://developers.google.com/maps/documentation/android/v1/mapkey
You will then notice the maps will not work when built in Eclipse using the debug keystore but will when exported and signed. It's an annoying process.

Empty grey tiles in map

I made an mapActivity with the key that someone gave me. But when I run it, it showed only grey tiles but when I asked them, they said its showing fine there. What could be the problem, why is it not showing here in my side.?
becuase key is generated by other keystore and you need to go here
Sign Up for the Android Maps API - Android Maps API - Google Code
and generate your on Maps API key.
and second option you must sign the app with the same keystore with which was used to create the Map API Key.

Google map just shows grey grid and markers

Both in eclipse and when uploaded to Play Store the app just shows the grey grid and the custom markers I added but the actual map is not shown.
I am using the keys from the previous developer before me and the previous versions seem to work on Google Play but when I build it it fails to show the map.
Can anyone help me with this?
Only two reasons this would ever happen:
Your device does not have an internet connection or is otherwise unable to download the map tiles because of a firewall on your network etc.
You are using an API key for the maps library that doesn't match the certificate you are signing the apk with. Remember that Eclipse signs the apk with a debug key, and you use a different key for publishing. See this documentation for details on this.
Google Maps API key is connected to they keystore, you should ask the previous developer for the keystore and export your APK with it. Otherwise, you follow the steps in this post and when you get the MD5 fingerprint you sign up here to get new Google Maps API key.

Android - cannot view map Google Maps API

I have a problem with google maps API on my android application.
before all was normal, and the application can display the map. I published the apk and follow all tahap2 correctly.
I install applications on my smartphone. but after a week or more all of a sudden my application can not display the map. only the grid view only.
if anyone can give me a solution to this problem?
Thanks in advance
DevYudh
I had this problem in the past. You have to register a Google Maps API key. (Not the debug one). Debug key only works when you are testing the app. But when you publish the app in the market, you need to use the release key. That will surely solve your problem.
See it here..
http://code.google.com/android/add-ons/google-apis/mapkey.html
for display google map on android device, the map key and apk file's sign key must match.
If you debugging, map key must be made by debug key's fingerprint. and the other side, for deploying apk map key must be made by deploying key's fingerprint.

Categories

Resources