error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory. :ReactNative:Running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory failed.
See original GitHub issueFAILURE: Build failed with an exception.
-
Where: Script ‘C:\react\zinia\node_modules@react-native-community\cli-platform-android\native_modules.gradle’ line: 170
-
What went wrong: A problem occurred evaluating script.
Command
config
unrecognized. Make sure that you have runnpm install
and that you are inside a react-native project.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
BUILD FAILED in 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running ‘npx.cmd --quiet --no-install react-native config’ command from ‘null’ directory. :ReactNative:Running ‘npx.cmd --quiet --no-install react-native config’ command from ‘null’ directory failed.
FAILURE: Build failed with an exception.
-
Where: Script ‘C:\react\zinia\node_modules@react-native-community\cli-platform-android\native_modules.gradle’ line: 170
-
What went wrong: A problem occurred evaluating script.
Command
config
unrecognized. Make sure that you have runnpm install
and that you are inside a react-native project.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
BUILD FAILED in 3s
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\react\zinia\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\react\zinia\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\react\zinia\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\react\zinia\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)
React Native version:
Steps To Reproduce
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:27 (4 by maintainers)
Top GitHub Comments
Thanks everyone for the help!
I closed this issue because it didn’t fit the template or include a meaningful description.
The comment must have got lost in the process sorry about that.
I faced the same problem.
npx --quiet react-native config
ornpx.cmd --quiet react-native config
That command, if you execute in the root directory of your react native project, will produce JSON output (if everything is configured correctly). The problem is, I did not locate my react native project in the root folder of the git repository. After then, I created another git repo and set the root folder of the repo to be the root folder of the react native project, and everything is ok then.