React native is blank on my android device. It's just a grey screen with the google logo. Unlike React-native-maps Blank page Only google logo it is is working on a simulator but not on real device.
I searched for the problem online:
- The API should be fine
- stylesheet is ok
- it's working on genymotion emulator
working on android virtual device
Perfectly working on Expo but not when I download the app from playstore. The meta-data in AndroidManifest.xml looks like this:
This is how the mapView looks like:
` <MapView showsUserLocation={false} style={styles.map} provider='google' ref={ref => { map3 = ref; }} onMapReady = { this.onMapReady } initialRegion={this.state.region} > <Marker image={logo} coordinate={this.state.coordinate} /> </MapView>`
.. and the style:
`const styles = StyleSheet.create({
mapContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ecf0f1',
},
map: {
flex: 1,
borderRadius: 4,
width,
height,
zIndex: 1,
},`