小编Adn*_*der的帖子

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

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

这是我的代码:

Position position = await Geolocato.getCurrentPosition( desiredAccuracy: LocationAccuracy.high);
Run Code Online (Sandbox Code Playgroud)

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

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

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

flutter flutter-plugin

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

flutter ×1

flutter-plugin ×1