MissingPluginException(使用地理定位器在颤振中找不到实现

时间:2021-06-04 09:24:14

标签: flutter flutter-plugin

我在 flutter 项目中使用 geolocator 来获取当前位置,但是出现了这个错误。 我在 ios 和 android 文件中添加了所有依赖项仍然出现此错误我不知道为什么 颤振通道稳定,2.12,

这是我的代码:

Position position = await Geolocato.getCurrentPosition( desiredAccuracy: LocationAccuracy.high);

这是我的错误,我也测试了 android 10、8,但回答相同

Unhandled Exception: MissingPluginException(No implementation found for method getCurrentPosition on channel flutter.baseflow.com/geolocator)

我正在使用地理定位器插件,这里是插件链接:https://pub.dev/packages/geolocator

0 个答案:

没有答案