模拟器不起作用:任务':app:installDebug'的执行失败

时间:2018-09-21 10:49:26

标签: android react-native

首先,我是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.

1 个答案:

答案 0 :(得分:1)

仿真器即使重启后也冻结在相同的状态。?

遵循步骤:

  • 打开Android Studio
  • 打开配置
  • 打开AVD Manager
  • 应该有一个引起问题的模拟器-(如果未创建新的模拟器,则为测试版本)
  • 转到“操作”中的向下箭头,然后选择停止
  • “操作”中再次相同,但是这次选择立即冷启动

只要我的模拟器出现问题,这对我都有效。