小编jea*_*hny的帖子

不变违规:requireNativeComponent:在 UIManager 中找不到“AIRMap”。没有修复吗?

我已按照react-native-maps文档中的指南进行操作:我收到错误。

我在 stackoverflow 和 google 上到处查看,但无法找到解决方案。

我尝试了在论坛上可以找到的所有答案,但仍然收到错误。

错误 :

不变违规:requireNativeComponent:在 UIManager 中找不到“AIRMap”。

我的代码:

import React from 'react';
import MapView from 'react-native-maps';
import { StyleSheet } from 'react-native';

export default class App extends React.Component {
  constructor() {
    super();
    this.state = {};
  }

  render() {
    return (
      <MapView
         style = {styles.map}
         showsUserLocation = {false}
         followUserLocation = {false}
         zoomEnabled = {true}
      />
   )
  }
}

const styles = StyleSheet.create ({
  map: {
     height: 400,
     marginTop: 80
  }
})
Run Code Online (Sandbox Code Playgroud)

react-native

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

react-native ×1