任务“:app:installation”的React Native BUILD FAQs执行失败

w8f9ii69  于 6个月前  发布在  React
关注(0)|答案(5)|浏览(57)

当我运行cmd > react-native run-android时,出现以下错误。请指导我修复此问题。

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

字符串

fhity93d

fhity93d1#

似乎没有连接的设备或无法检测到设备。执行adb devices以查看连接的设备列表。如果没有设备出现,请确保您的模拟器已打开,或者您的设备已连接并启用usb调试模式。
如果这不能解决问题,那么通过运行adb kill-serveradb start-server来重新启动adb服务器(如果您使用的是Linux或mac,则可能需要使用sudo来运行它)
但是如果adb devices显示未经授权,你只需要解锁你的手机,并给予你的电脑访问权限。

nzkunb0c

nzkunb0c2#

上述错误是针对设备是否连接
请运行以下命令并检查设备是否已连接
第一个月

mdfafbf1

mdfafbf13#

确保您已打开USB调试。

ig9co6j1

ig9co6j14#

首先,你必须在你的物理设备上打开开发者模式。对于android,它可以很容易地在设置中找到(如果你不知道如何打开开发者模式,可以在youtube上搜索)。
然后运行 *adb设备 *
在MIUI 11中,我发现一段时间后它会自动禁用开发者模式。所以你必须重新启用它。

qqrboqgw

qqrboqgw5#

对我来说,我有设备连接在adb设备和开发者模式是开.但我有apk版本安装在我的设备上.一旦我删除应用程序从我的设备它wored.

相关问题