react-native-maps: Android crash when MapView is rendered
React Native Version: 0.59.10
What Happened
After entering the screen with MapView, the app crashes. There’s no error from logcat. MapView works fine in iOS but crashed in Android Originally everything works fine in my older version of react native (Forgot which version lmao), but after I update my project to 0.59.10, this app crash happen.
My MapView code:
import MapView, {Marker,PROVIDER_GOOGLE} from 'react-native-maps';
<MapView
initialRegion={{
latitude: this.state.latitude,
longitude: this.state.longitude,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
style={{height:'77.5%',width:'100%'}}
provider={PROVIDER_GOOGLE}
showsUserLocation={true}
followsUserLocation={true}
onUserLocationChange={location => this.setState({latitude:location.nativeEvent.coordinate.latitude, longitude:location.nativeEvent.coordinate.longitude})}
>
<Marker
coordinate={{latitude: loclat, longitude: loclon}}
title={locname}
/>
</MapView>
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18
Add this line in your androidmanifest.xml file in the
<application>tag:-This worked for me!!! Thxxx I love u so much
Thanks man! Fixed the issue
I have also excluded play-services-base and play-services-maps. However, mine is still crashing 😦
I have the same issue as @Gabsys and doing what @elkinjosetm and @agarwalnaveen22 said is not fixing the error, I have reat-native: 0.70.0 react-native-maps: 1.3.2
When I render the MapView on Android there is a crash (a critical error without logs) only a stacktrace in which appears the AirMapView
T_T