gpt4 book ai didi

ios - React Navigation - "Cannot read property ' 状态“未定义”,即使手势处理程序已安装并链接

转载 作者:行者123 更新时间:2023-11-29 05:50:14 27 4
gpt4 key购买 nike

问题

尝试在 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"
}
}

enter image description here

最佳答案

问题是即使react-native链接表明包已成功链接,pod文件也未安装。

要解决此问题,请按以下步骤操作:

  1. cd iOS
  2. Pod 安装
  3. 清理 ios 文件夹
  4. 运行应用程序

关于ios - React Navigation - "Cannot read property ' 状态“未定义”,即使手势处理程序已安装并链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55749992/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com