Geocoder getFromLocation failed

Viewed 4799

I'm trying to get placemarks from coordinates.

I'm using geoLocator for that. It was working fine today morning, but now, it throws platform exception.

PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: <lat>, longitude: <long>)., null)

It says it's a network error, but my device is connected to the internet,

First, i thought there might be some problem in the Geolocator package, so i used Geocoding package, but the problem persists.

This is the error from geocoder.

Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@e8c2197, ex = grpc failed, return results = []

Please help.

6 Answers

Try to WIPE DATA on your emulator. Restart it.

It works.

try to add localeIdentifier parameter. works for me. my function code will be like

List<Placemark> newPlace = await GeocodingPlatform.instance.placemarkFromCoordinates(position.latitude, position.longitude,localeIdentifier: "en");

I had the same problem. Try another emulator (create another emulator as if you are using another android or ios device). May be the current device that is being emulated is having problems connecting to the internet

its mainly due to change in location of your device if you're using a external device like an android phone then you should reboot your device and it'll work .

Not sure what is the problem, but I ended up making a new android emulator(a new emulated device) and it worked fine.

Related