React native 不再支持通过UIManager直接从UIManager配置React本机访问视图管理器[';AIRMap';]
我收到以下警告:“不再支持通过UIManager['AIRMap']直接从UIManager访问视图管理器配置。请改用UIManager.getViewManagerConfig('AIRMap')”。自从我安装react native maps软件包以来,它一直在显示。我应该忽略它还是有解决方案React native 不再支持通过UIManager直接从UIManager配置React本机访问视图管理器[';AIRMap';],react-native,react-native-android,react-native-maps,React Native,React Native Android,React Native Maps,我收到以下警告:“不再支持通过UIManager['AIRMap']直接从UIManager访问视图管理器配置。请改用UIManager.getViewManagerConfig('AIRMap')”。自从我安装react native maps软件包以来,它一直在显示。我应该忽略它还是有解决方案 提前感谢这似乎是react-native 0.58的已知问题要隐藏警告,请将react-native手势处理程序设置为“1.3.0” 纱线添加反应本机手势-handler@1.3.0通过将“react
提前感谢这似乎是react-native 0.58的已知问题要隐藏警告,请将react-native手势处理程序设置为“1.3.0”
纱线添加反应本机手势-handler@1.3.0
通过将“react native手势处理程序”降级到1.3.0,可以解决此问题。您还需要清除缓存,否则将继续看到警告
“反应本机手势处理程序”:“~1.3.0”
npm安装
或纱线安装
expo r-c
这是为那些想要快速修复的人准备的,下面是一些可以运行来修复它的命令。请记住,此解决方案适用于世博会用户
// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo@latest
// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json
// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler
// use expo to install the appropriate version
$ expo install react-native-gesture-handler
// start expo with a clean cache
$ expo start --clear
您只需将react native手势处理程序降级到1.3.0即可 您还可以执行以下步骤:
如果您正在使用expo,现在可以使用命令
expo install react-native-gesture-handler
这将确保在1.3.0版而不是1.5.x版中安装react-native手势处理程序时不会出现任何中断。
有人在讨论这个问题。效果很好。尽管如此,降级是应用程序中断错误的解决方案,这让人非常沮丧。在此处使用expo-install-dependency name
将确保安装依赖项的“expo-supported”版本。