GeekyAnts / react-native-seed

Get your favorite boilerplate of React Native
http://ReactNativeSeed.com
652 stars 15 forks source link

react-native run-android fails out of the box #17

Open loganmay opened 6 years ago

loganmay commented 6 years ago

Hi, I'm running Windows 10 and cloned the git@github.com:GeekyAnts/react-native-boilerplate-redux-flow.git repo and ran react-native run-android and it failed with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No connected devices!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 11 mins 35.338 secs
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/android-setup.html
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
    at onErrorNT (internal/child_process.js:406:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
    at onErrorNT (internal/child_process.js:406:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Please let me know if you need any more information or there is any other way I can help to resolve this, thanks.

alexjorgef commented 5 years ago

@loganmay as you can see in error exception:

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No connected devices!

First check if you have Android SDK are installed correctly with all enviornment variables. try to check if any adb devices are connected (cellphone or emulator) by typing adb devices on cmd or bash terminal.

PS: for Windows you will need a user env variable for android with this value:

%USERPROFILE%\AppData\Local\Android\sdk\platform-tools;