'Expo React Native app crashes on Android but works in Expo Go
When I'm previewing my app in the Expo Go application everything works just fine, but when I build the android APK everything works great until I try to load the screen which contains the MapView. When I go to that page the app crashes without telling me what's wrong
This is the MapView:
<MapView
ref={map}
style={styles.map}
provider={PROVIDER_GOOGLE}
initialRegion={location}
pitchEnabled={false}
userLocationUpdateInterval={3000}
userLocationPriority="balanced"
toolbarEnabled={false}
tintColor="#00B4B4"
customMapStyle={customMapStyle}
/>
btw, I have no Idea how to see the crash log if there is any log(I'd love to know how to see it)
Solution 1:[1]
You need to add Google Maps Api key. In expo go, expo has their own Google Maps Api key, but when you build your own apk you need to add your own.Check this from expo docs: https://docs.expo.dev/versions/latest/sdk/map-view/#deploying-google-maps-to-an-android-standalone
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rami Elwan |
