首先,我是react-native的新手。我在Facebook官方网站上开始了React-native教程。当我逐步执行react-native android设置时,我将运行此项目。当显示此消息时,请解决此错误并建议我。请帮助我。
D:\Linux\IDE\All-Workspace\JavaScript-Workspace\React-Workshop\AwesomeProject>react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat install debug)...
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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
27 actionable tasks: 1 executed, 26 up-to-date
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.
答案 0 :(得分:1)
只要我的模拟器出现问题,这对我都有效。