android - 引起:java.lang.Exception:无法识别命令`config`
问题描述
运行复制的 React-native 项目后:
引起:java.lang.Exception:命令config
无法识别。确保你已经运行npm install
并且你在一个 react-native 项目中。
我做了 npm install 但没有帮助。
包.json
{
"name": "ProjectName",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"postinstall": "node ./scripts/stfu.js"
},
"dependencies": {
"@invertase/react-native-apple-authentication": "^0.1.1",
"@philly25/react-native-paytm": "^1.0.12",
"@react-native-community/datetimepicker": "^2.2.1",
"@react-native-community/google-signin": "^3.0.4",
"@react-native-community/masked-view": "^0.1.6",
"@react-native-community/netinfo": "^5.3.3",
"@react-native-community/push-notification-ios": "^1.0.6",
"fuse.js": "^3.4.6",
"lottie-react-native": "^3.3.2",
"moment": "^2.24.0",
"react": "16.12.0",
"react-native": "^0.61.5",
"react-native-action-button": "file:./custom_modules/react-native-action-button",
"react-native-android-sms-listener": "^0.7.0",
"react-native-calendar-picker": "file:./custom_modules/react-native-calendar-picker",
"react-native-calendars": "file:./custom_modules/react-native-calendars",
"react-native-carousel-view": "file:./custom_modules/react-native-carousel-view",
"react-native-chart-kit": "file:./custom_modules/react-native-chart-kit",
"react-native-fbsdk": "^1.1.2",
"react-native-fetch-polyfill": "^1.1.3",
"react-native-firebase": "^5.6.0",
"react-native-fs": "^2.16.2",
"react-native-gesture-handler": "^1.5.6",
"react-native-google-drive-api-wrapper": "^1.2.0",
"react-native-google-fit": "^0.9.17",
"react-native-google-signin": "^2.1.1",
"react-native-image-pan-zoom": "^2.1.11",
"react-native-image-picker": "^2.3.0",
"react-native-modal": "^11.5.3",
"react-native-modal-datetime-picker": "^8.1.3",
"react-native-options-menu": "^2.0.2",
"react-native-otp-input": "file:./custom_modules/react-native-otp-input",
"react-native-popup-menu": "^0.15.7",
"react-native-push-notification": "^3.1.9",
"react-native-raw-bottom-sheet": "^2.0.6",
"react-native-reanimated": "^1.7.0",
"react-native-render-html": "^4.2.0",
"react-native-responsive-dimensions": "^3.0.0",
"react-native-restart": "0.0.13",
"react-native-safe-area-context": "^0.6.4",
"react-native-screens": "^2.0.0-beta.1",
"react-native-select-input-ios": "file:./custom_modules/react-native-select-input-ios",
"react-native-simple-toast": "^1.0.0",
"react-native-size-matters": "^0.3.0",
"react-native-slideable-calendar-strip": "file:./custom_modules/react-native-slideable-calendar-strip",
"react-native-snap-carousel": "^3.8.4",
"react-native-svg": "^11.0.1",
"react-native-swipe-gestures": "^1.0.4",
"react-native-swipe-list-view": "^2.1.3",
"react-native-tag-select": "file:./custom_modules/react-native-tag-select",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "^8.0.6",
"react-navigation": "^4.1.1",
"react-navigation-stack": "^2.1.0",
"react-navigation-tabs": "^2.7.0",
"realm": "^4.0.0-beta.0"
},
"devDependencies": {
"@babel/core": "7.8.4",
"@babel/runtime": "7.8.4",
"@react-native-community/eslint-config": "^0.0.5",
"eslint": "^6.5.1",
"babel-jest": "25.1.0",
"jest": "25.1.0",
"metro-react-native-babel-preset": "0.58.0",
"react-test-renderer": "16.12.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./app/res/fonts/"
]
}
}
分享图片:
从项目文件夹 PFA 运行 npm install。
解决方案
推荐阅读
- python - 在字典列表中查找最常出现的字典的最佳方法
- python - 如何将配置文件设置为 QQmlApplicationEngine?
- flutter - chart_flutter:折线图中负值的不同颜色
- postgresql - 查询在 PostgreSQL 中花费了太多时间
- javascript - 实现 es6 模块后出现变量引用错误
- lambda - 使用 lambda 创建 pyspark rdd
- css - 如何在图像背景上应用图案和颜色?
- sql - 在 SQL 中对字母数字列进行排序
- javascript - 如何在js中进行去抖动
- debugging - PhpStorm 可以调试已重定向到使用 Nginx 的 X-Accel-Redirect 的文件吗?