当前位置: 首页 > 知识库问答 >
问题:

React本机生成失败任务“:app:installdebug”执行失败

阎智
2023-03-14
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

共有1个答案

百里芷阳
2023-03-14

似乎没有连接的设备或设备无法被检测到。执行ADB Devices查看已连接设备的列表。如果没有设备出现,请确保模拟器已打开,或者设备已连接并启用usb调试模式。

如果不能解决这个问题,请通过运行adb kill-serveradb start-server重新启动adb服务器(如果使用linux或mac,可能需要使用sudo运行它)

但是如果ADB Devices显示未经授权,您只需解锁手机并允许计算机访问即可。

 类似资料:
  • 每当我尝试运行“react-native run-android” 我失败了: 任务“:app:PackageDebug”执行失败 我试着结账给previus提交。我尝试删除android/app/build和re-build,我尝试删除debug.keystore并再次启动它。 他们都没有解决这个问题。 我之前在android虚拟设备中成功运行了我的应用程序,并且我已经把我的应用程序上传到了go

  • 我已经尝试了多种解决方案在线无法使构建工作 我得到任务“:app:mergereleaseResources”的执行失败。 [raw/app]C:\users\lenovo\documents\github\marist-mobile-app\android\app\src\main\res\raw\app.json[raw/app]C:\users\lenovo\documents\github

  • 我使用的是Android Studio 2.0,当我试图运行程序时,发生了一些奇怪的事情。我运行了gradle的build命令,得到了以下错误: 因此...那是什么鬼东西?我应该做的是将代码添加到gradle.build来解决这个问题,但问题是:为什么我会得到这个错误消息? 请救救我伙计们!

  • 我正在使用assembleRelease准备发布构建,但我得到了这个错误。 配置项目:项目中的应用程序配置“编译”:不推荐使用“app”。请改用“实现”。 配置项目 :rn-fetch-blob CompileOptions.bootClasspath 属性已被弃用,并计划在 Gradle 5.0 中删除。请改用 CompileOptions.bootstrapClasspath 属性。 配置项目

  • 我有一个第三方依赖项(react-native-admob),在它的build.gradle文件中指定了以下内容:com.google.android.gms:play-services-ads:+。看看谷歌Android API发布说明页面,2019年6月17日,整个com.Google.Android.gms API组都有突破性的更新。 我运行“./Gradlew AssembleDebug”