我正在将颤振模块添加到 Android 本机应用程序中,该模块包含谷歌地图,当颤振模块初始化时,它会路由到颤振页面但地图不显示。当我调试时,我得到了这个异常:
MissingPluginException:找不到通道颤振/平台视图上的方法创建的实现
这是颤振代码
class _TrackingMapsState extends State<TrackingMaps> {
GoogleMapController _controller;
static LatLng _initialPosition;
Set<Marker> startedCircuitMarker = Set();
final LatLng _center = const LatLng(45.521563, -122.677433);
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: Text('Localisation de Transport'),
),
body: GoogleMap(
onMapCreated: (GoogleMapController controller) {
setState(() {
this._controller = controller;
});
// startMqttConnection();
},
myLocationEnabled: true,
myLocationButtonEnabled: true,
markers: startedCircuitMarker,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 11.0,
),
),
),
);
}