为什么 MapView.Marker 在类型 'typeof MapView' 上不存在?

Why MapView.Marker does not exist on type 'typeof MapView'?

我正在用本机反应开发一个 android 应用程序 "Location Finder",为此我安装了 "react-native-maps" 包。它正确显示了地图和位置,但现在我需要将指针放在我使用“”的位置,但它显示 "Marker does not exist on type 'typeof MapView'"

https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md

我已经按照上面的URL安装并实现了功能。

import MapView from 'react-native-maps';
<MapView style={styles.map} region={props.userLocation}>
     <MapView.Marker />
</MapView>

"Marker" 应该可用,因为我从 "react-native-maps" 导入了 "MapView"。 但它给了我以下错误。
"Property 'Marker' does not exist on type 'typeof MapView'.ts"

你能试试这个吗?您可以导入 Marker

import MapView, { Marker } from 'react-native-maps';
<MapView style={styles.map} region={props.userLocation}>
     <Marker />
</MapView>