我正在尝试使用airbnb的react-native-maps,但地图没有出现在模拟器上.我的代码似乎与解决了这个问题的其他代码相同,但模拟器只是一个带有红色边框的空白屏幕.开箱即用Mapview可以使用,但我想使用airbnb的版本.
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,
}, …Run Code Online (Sandbox Code Playgroud) 我正在尝试 WebStorm,但遇到有关 Express 和核心节点方法的未解析函数或方法的烦人错误。
我已启用 Node.js 核心库并使缓存无效/重新启动。请参阅附件截图。有谁知道如何使那些不正确的错误消息消失?