我正在尝试从坐标中获取地标。
我在用着geoLocator
为了那个原因。今天早上工作正常,但现在抛出平台异常。
PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: <lat>, longitude: <long>)., null)
它说这是网络错误,但我的设备已连接到互联网,
首先,我认为可能存在一些问题Geolocator
包,所以我用了Geocoding
包,但问题依然存在。
这是地理编码器的错误。
Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@e8c2197, ex = grpc failed, return results = []
请帮忙。
请参阅此 flutter_geocoding 问题(已关闭):https://github.com/Baseflow/flutter-geocoding/issues/23 https://github.com/Baseflow/flutter-geocoding/issues/23
提出了两种解决方案:
- 创建一个新的模拟器
- 停止模拟器上的WiFi,重新启动WiFi并让它找到网络(AndroidWiFi)
解决方案 2 对我有用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)