question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

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 run npm 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 run npm 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:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:27 (4 by maintainers)

github_iconTop GitHub Comments

34reactions
rickhanloniicommented, Dec 11, 2019

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.

15reactions
stevelee2497commented, Dec 10, 2019

I faced the same problem. npx --quiet react-native config or npx.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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native android error Failed to install the app ...
Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 :ReactNative: ...
Read more >
error failed to install the app. make sure you have the android ...
Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081'. i get this error when i ...
Read more >
Task :app:installDebug FAILED | React Native Errors | Fixed!
Make sure you have an Android emulator running or a device connected. Error : Command failed : gradlew. bat app:installDebug If you also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found