react-native - 使用 wix@react-native-navigation 运行 react-native 应用程序时出错
问题描述
我安装wix/react-native-navigation
并遵循了所有必需的配置,以便能够在带有 react native 的 android 中使用它。但是npm run android
即使我的脚本在 package.json 中配置,我也无法正常工作
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"lint": "eslint .",
"android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug"
},
npm run android
cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE'''
npm ERR! errno 1
npm ERR! Awesome@0.0.1 android: `cd ./android && ./gradlew app:assembleDebug
&& ./gradlew installDebug`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Awesome@0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\z0041hhp\AppData\Roaming\npm-cache\_logs\2019-03-29T09_08_37_797Z-debug.log
解决方案
我的 Windows 10 也有类似的问题,我所做的是删除“./”我有类似的东西
"scripts": {
...
"android": "cd android && gradlew app:assembleDebug && gradlew installDebug"
}
推荐阅读
- alexa - Alexa 是否仍在请求中发送视口数据?
- angular - Cannot read property ‘email’ Auth0
- vue.js - 为什么在 Vue 中使用模态时我的 v-if 不触发?
- python - 如何以 Viewclass 作为按钮从 RecycleView 获取实例?
- java - 方法中类型参数的限制
- javascript - 我怎样才能让我的模糊动画每次都能更快地工作?
- css - 如何更改css模态框图形显示宽度?
- python - 为什么队列是查找最近呼叫数量的最佳方法?【Leetcode问题】
- database - 视图 VS 物化视图
- php - 删除用户函数 SQL 查询不发送任何内容 (PHP)