任务“:app:installDebug”的执行失败反应本机应用程序

ABD*_*LAT 2 android build react-native

嗨,当我尝试通过以下方式在我的真实 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
Run Code Online (Sandbox Code Playgroud)

Aki*_*nda 6

试试这些步骤。

  1. 删除项目中的节点模块文件夹。
  2. 删除构建文件夹 android/build
  3. 关闭所有正在运行的终端。
  4. 确保您已在您的环境中安装了 adb 驱动程序。如果没有安装 adb 驱动程序。(适用于 macOS /适用于 Windows )
  5. 打开新的终端窗口并在您的项目文件夹中运行npm install以重新安装节点模块。
  6. 最后使用运行您的应用程序 react-native run-android