需要给包裹的View添加大小
<View style={{flex:1}}>
<MapView
style={{width:200,height:300}}
center={{
latitude: 39.91095,
longitude: 116.37296
}}
/>
</View>
修改后不会闪退,但是无法在模拟器上显示地图,得用真机测试。
需要给包裹的View添加大小
<View style={{flex:1}}>
<MapView
style={{width:200,height:300}}
center={{
latitude: 39.91095,
longitude: 116.37296
}}
/>
</View>
修改后不会闪退,但是无法在模拟器上显示地图,得用真机测试。