小编Ale*_*der的帖子

react-native-maps 标记抛出和 IndexOutofBoundsException:索引 1 无效,大小为 0

我正在尝试让 react-native-maps 标记显示在我的 Android 设备上(它在 iOS 上运行良好)但它向我抛出 IndexOutofBoundsException: Invalid index 1, size is 0 error at render time。

http://i.imgur.com/owletnw.png

render() {
    const INITIAL_REGION = { latitude: 52.221835, longitude: 21.000896, latitudeDelta: 0.0922, longitudeDelta: 0.0421 };
    return (
        <MapView ref="map"
            showsUserLocation = { true }
            loadingEnabled = { true }
            showsTraffic = { false }
            showsBuildings = { false }
            style = { styles.map, {flex: 1} }
            initialRegion = { INITIAL_REGION }
        >
            <View style={{flex: 0.1, flexDirection: 'row', position: 'absolute', justifyContent: 'space-between', …
Run Code Online (Sandbox Code Playgroud)

react-native react-native-android react-native-maps

0
推荐指数
1
解决办法
1659
查看次数