【发布时间】:2019-01-07 06:36:45
【问题描述】:
我正在尝试根据 https://wix.github.io/react-native-navigation/#/docs/Installing 将 Wix 导航库 添加到我的项目中,但是当我在终端中运行 npm install --save react-native-navigation 命令然后我在 android studio 中打开我的 android 项目时,我没有在我的项目中看不到任何用于导航的库模块。但是 react-native-navigation 的名称会出现在 package.json 文件中。
这是我的 package.json 文件:
{
"name": "PleaseAnswer",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-navigation": "^2.5.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
【问题讨论】:
-
您应该运行
react-native link并再次检查。 -
我这样做了,但它不起作用。
-
那你需要自己添加模块,有时自动链接失败。请按照github repo中给出的步骤手动安装
标签: android react-native installation navigation