嘿,我将通过以下命令
在反应原生中安装谷歌地图npm install react-native-maps --save
但它在下面显示我的错误:
react-native-maps@0.16.2 requires a peer of react-native@>=0.40 but none was installed.
我已经完成了本教程
https://www.slideshare.net/kobkrit/reactnative-tutorial-map
请提前检查谢谢..
答案 0 :(得分:1)
您正在尝试安装最新版本的react-native-maps
,并且它与react-native
> = 0.40兼容。升级react-native
或尝试安装较旧的react-native-maps
版本。您可以通过运行npm install react-native-maps@0.12.2 --save
甚至旧版本来执行此操作 - 请检查releases。