Android 任务';的执行失败:应用程序:installDebug';反应本机应用程序

Android 任务';的执行失败:应用程序:installDebug';反应本机应用程序,android,react-native,build,Android,React Native,Build,您好,当我尝试在真实的android设备上运行react应用程序时,通过: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: com.android.ddmlib.Install

您好,当我尝试在真实的android设备上运行react应用程序时,通过:
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: com.android.ddmlib.InstallException: Failed to install all 

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
试试这些步骤

  • 删除项目中的节点模块文件夹
  • 删除android/build中的build文件夹
  • 关闭所有正在运行的终端
  • 确保在您的环境中安装了adb驱动程序。如果没有,请安装adb驱动程序。(/)
  • 打开“新终端”窗口,在项目文件夹中运行
    npm install
    以重新安装节点模块
  • 最后使用
    react native run android运行应用程序

  • 将com.android.tools.build:gradle升级到2.3.0,将gradle升级到3.3版本。@AnubhavGupta我如何在终端中升级gradle。。我不使用android studio,只使用终端