Useful or not, from you.
react-native (react-native run-android) -> Error: Command failed: ./gradlew installDebug

I have a problem with runing react-native. When I type react-native run-android it appeare that error !!

Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().

* 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 0s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Command failed: ./gradlew installDebug

Error: Command failed: ./gradlew installDebug
    at checkExecSyncError (child_process.js:601:13)
    at Object.execFileSync (child_process.js:621:13)
    at runOnAllDevices (/home/moun3im/Downloads/AwesomeProject/node_modules/react-native/local-cli/runAndroid/runAndroid.js:299:19)
    at buildAndRun (/home/moun3im/Downloads/AwesomeProject/node_modules/react-native/local-cli/runAndroid/runAndroid.js:135:12)
    at isPackagerRunning.then.result (/home/moun3im/Downloads/AwesomeProject/node_modules/react-native/local-cli/runAndroid/runAndroid.js:65:12)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

This is my react environment

  React Native Environment Info:
    System:
      OS: Linux 4.19 Kali GNU/Linux Rolling 2019.1
      CPU: (4) x64 Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
      Memory: 116.45 MB / 5.71 GB
      Shell: 5.0.2 - /bin/bash
    Binaries:
      Node: 8.11.2 - /usr/bin/node
      npm: 5.8.0 - /usr/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.58.3 => 0.58.3 
    npmGlobalPackages:
      react-native-cli: 2.0.1
That's a useful answer
Without any help

below is my error .emulator in now working but same project work on real device .what can i do dear...

Get more help at https://help.gradle.org

BUILD FAILED in 3s 27 actionable tasks: 1 executed, 26 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.