ios - 每当安装 React Native Gesture Handler 它开始给出错误
问题描述
我正在使用反应导航安装反应导航,但是当我安装时npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
,它开始在 iOS 中给我错误。
错误是Use of undeclared identifier 'UIScrollTypeMaskAll'
RNPanHandler.m
我遵循文档的所有步骤。
Xcode 版本:- 11.3.1
反应本机手势处理程序版本:- 1.9.0
我也试过这个: -
1.
import 'react-native-gesture-handler'; //by adding on top
import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
export default function App() {
return (
<NavigationContainer>{/* Rest of your app code */}</NavigationContainer>
);
}
rm -rf node_modules
并删除package-lock.json
。- 将 React 本机手势处理程序与 React 本机手势处理程序分开安装
pod install
解决方案
这里已经提到了这个问题,
https://github.com/software-mansion/react-native-gesture-handler/issues/1235
尝试将您的 XCode 版本升级到 12.2 或尝试将您的 React Native Gesture Handler 版本升级到 1.8.0
推荐阅读
- c# - 将多个 JSON 记录发送到 .NET 控制器
- c++ - 为什么多线程不能改进 mmap 任务?
- mysql - 如何避免 MySQL 的 case 语句中的双重计算?
- android - 具有自定义重力选项的导航组件工具栏
- apache-spark - spark中的默认分区
- laravel - 从 vue 表中单击并保存到 Laravel 控制器时获取 ID
- excel - 使用隔日作为变量获取两个日期之间的天数
- java - 获取在封闭范围中定义的局部变量必须是最终的或有效的最终的
- mongodb - 如何在mongodb中保留id和_id属性
- arelle - Arelle 在验证 Xule 时抛出 IOError