我試圖使用airbnb的react-native-maps,但是地圖沒有顯示在模擬器上。我的代碼似乎與其他已解決問題的代碼相同,但模擬器只是一個帶有紅色邊框的空白白色屏幕。 開箱即用Mapview,但我想使用airbnb的版本。反應本機react-native-maps Mapview不顯示
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import MapView from 'react-native-maps';
export default class Haulr extends Component {
render() {
return (
<MapView
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
/>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
map: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
});
AppRegistry.registerComponent('Haulr',() => Haulr);
iOS or android? – Vkrm
你是否設法解決這個問題?我目前有同樣的問題:( –
發現此內容有幫助 https://medium.com/@suchydan/how-to-solve-google-play-services-version-collision-in-gradle-dependencies-ef086ae5c75f –