MapView 未在 Android 模拟器中呈现。 "Unfortunately, Expo has stopped." 发生错误

MapView not rendered in Android emulator. "Unfortunately, Expo has stopped." error occured

我正在尝试 运行 在 expo 内的 android 模拟器中 https://docs.expo.io/versions/latest/sdk/map-view 中列出的示例。 但它不起作用,每次都崩溃并显示消息 "Unfortunately, Expo has stopped." 非常感谢您帮助 MapView 在 Android 模拟器上正确显示。

现在效果很好。这只是因为 google API 密钥不正确。

但是没有显示详细的错误信息,只是崩溃了,所以我不确定并且很困惑是什么问题。

最后把我的工程换成Flutter,同样的功能,发现我的API键不对。所以我再次回到 React Native Expo 并输入了正确的 API 密钥并使项目运行良好。

我做的是下面两件事
1、根据下面的link为android生成了一个googleAPI地图SDK的key。 https://developers.google.com/maps/documentation/android-sdk/get-api-key
2. 在 app.json 文件中键入 API 键。

如有任何疑问,请告诉我。 谢谢