ios - React Navigation - 即使安装并链接了手势处理程序,“无法读取未定义的属性‘状态’”
问题描述
问题
尝试在 React Navigation 中使用堆栈导航器时出现错误“无法读取未定义的属性‘状态’”。Switch 和 bottomTabNavs 运行良好。
如果有人知道如何解决这个问题,那就太棒了!
我试过的
我已经检查以确保 react-native-gesture-handler 已正确安装和链接。
我的 Package.json:
{
"name": "app",
"version": "5.1.0",
"private": true,
"devDependencies": {
"babel-jest": "23.6.0",
"fs-extra": "^6.0.1",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.7.0",
"reactotron-react-native": "^3.2.0",
"replace-in-file": "^3.4.2"
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios --simulator=\"iPhone X\"",
"apk": "cd android && ./gradlew assembleRelease",
"rename": "node ./bin/rename.js",
"start": "react-native start",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"axios": "^0.18.0",
"lodash": "^4.17.11",
"react": "16.6.3",
"react-native": "0.58.0-rc.2",
"react-native-firebase": "^5.2.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-rate": "^1.1.6",
"react-native-sensitive-info": "5.2.9",
"react-native-splash-screen": "^3.2.0",
"react-native-status-bar-height": "^2.3.1",
"react-native-table-component": "^1.2.0",
"react-navigation": "^3.3.2"
}
}
解决方案
问题是即使 react-native 链接表明包已成功链接,也没有安装 pod 文件。
要解决此问题,请执行以下步骤:
- 光盘
- 吊舱安装
- 清理ios文件夹
- 运行应用程序
推荐阅读
- elasticsearch - Kibana 中的日期差异脚本字段
- r - 在 R 中的大型数据集上获取所有可能的组合
- c# - 方法“登录”没有重载需要 4 个参数
- google-apps-script - GAS 代码通过 Telegram 将 google 表格作为 pdf 文件通过电子邮件发送给某人
- c# - 网格中的通用 JSON 反序列化
- python - 如何更快地从字符串列表构建自定义字典
- c# - 从服务器端以编程方式发送 Google Analytics 事件不起作用
- ios - 我可以在 iOS 原生联系人中添加我的应用的自定义链接吗?
- magento2 - Magento 2 销售发货视图显示 404 管理页面
- c# - 如何从 ASP.NET MVC 中的嵌套 json 结果中读取值