Issue
I'm getting the following error when i run the cmd > react-native run-android Guide me to fix this issue.
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: 1 mins 27.72 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
Solution
It seems that there's no connected devices or the device could not be detected.
Execute adb devices
to see the list of connected devices.
If no device appears make sure that your emulator is open, or your device is connected and usb debugging mode is enabled.
If that doesn't fix it, restart the adb server by running adb kill-server
and then adb start-server
(you may need to run it with sudo
if you're using linux or mac)
But if adb devices
shows unauthorized you just need to unlock your phone and give your computer access.
Answered By - Atef
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.