3

Before I start, yes, I have searched and, no, the other related topics littered with (or without) solutions did not help me.

I recently started programming in Android, so I'm far from experienced. However I'm noticing quite some resemblance to C# in terms of writing which made it a logical choice for me.

Currently working on a quick test app that's supposed to display the GMap in a fragment, however, nothing is coming up apart from a light grey background and the + and - signs towards the bottom right.

The logcat depicted the following error:

08-29 08:28:48.190: E/Google Maps Android API(5147): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

Okay, now I'm thinking something went wrong with the API stuff, though I followed most of what's displayed on this page. I suppose I could ask the author but most of the others seem to have luck & joy with similair methods & code so the issue must be specificly me. However I did find this page, but it is now an older topic with no solutions at all.

I'm testing this on an actual android device, Galaxy S2, and everything else seems to work fine apart from this bit.

I used the keytool, wrote the SHA-1 fingerprint I got from the keytool (linked to debug.keystore), and put this in the console, along with what I'm gonna call my namespace. I retrieved the API key, stuck it in the manifest and launched the app only to burst into tears.

I tried multiple things up to this point over the past few days. One completely prevented the app from booting, while another even gave me a bright yellow map (with no streets or info, just the interface).

Any suggestions/hints/tips?

Community
  • 1
  • 1
  • you should check in Google API COnsole where you are Generating your Google API key. – Piyush Aug 29 '13 at 07:10
  • I did just look into the API Access thing, and now getting an error there, ' An unexpected error has occurred. We're looking into it. '. Perhaps this issue is not me but Google? Under the Reports page, there's 0 incoming requests, so the phone never got the map itself apparently. –  Aug 29 '13 at 07:47

2 Answers2

2

It just can be something wrong with you api key.

Check this:

In Version 2 Map view does not show map

Failed to load map. Error contacting Google servers. This is probably an authentication issue

Community
  • 1
  • 1
silvia_aut
  • 1,481
  • 6
  • 19
  • 33
  • Reading from both topics, I'm already using MapFragment, as suggested in the answer in the first link, along with the correct permissions. Your second link proves helpful however but I can't make much sense of [this](http://stackoverflow.com/a/16590238/1457922) reply & comment. I'm running the App in debug mode on an actual phone, could that cause these issues? –  Aug 29 '13 at 08:20
  • Yes this could cause these issues. – silvia_aut Aug 29 '13 at 08:23
  • Try to run the app and not to debug. – silvia_aut Aug 29 '13 at 08:24
  • I've tried both the Run As and Debug As options and neither are doing anything different. Completely reinstalling the app (by removing from the phone, cleaning project and then running/debugging again) has no effect either. –  Aug 29 '13 at 08:30
0

@silvia_aut Was right. My issue turned out to be that I was running the app directly from within Eclipse (thus always with a debug configuration it appears).

I followed this tutorial, followed by downloading an AppInstaller app from the store, putting the app in the root folder and installing the app through the AppInstaller. And everything seems to be working now.

Thanks!