1

Possible Duplicate:
Geocoder.getFromLocation throws IOException on Android emulator

I am using Google api 7, Android2.1 emulator

I am trying to do reverse geocoding and I get:

03-07 16:19:42.661: WARN/System.err(261): java.io.IOException: Unable to parse response from server

on that line:

      List<Address> addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);

any idea?

thanks, ray.

Community
  • 1
  • 1
rayman
  • 18,586
  • 41
  • 135
  • 234

1 Answers1

1

Do note that when you call that method, it fires off an API call to Google Maps' servers - it isn't doing it on the device. I suspect this is an error you will see sometimes, because the method is not managing to get a meaningful response from the Google Maps API. I've used this method and I occasionally see that error, but I usually put the method into a loop of 10 retries, and quietly ignore the occasional error. If it's happening every time you call the method, there's something odd happening

Ollie C
  • 27,184
  • 33
  • 125
  • 211