如何设置谷歌地图反应原生?面临错误

时间:2017-08-28 09:28:19

标签: android reactjs google-maps react-native

嘿,我将通过以下命令

在反应原生中安装谷歌地图
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

请提前检查谢谢..

1 个答案:

答案 0 :(得分:1)

您正在尝试安装最新版本的react-native-maps,并且它与react-native> = 0.40兼容。升级react-native或尝试安装较旧的react-native-maps版本。您可以通过运行npm install react-native-maps@0.12.2 --save甚至旧版本来执行此操作 - 请检查releases