首页 > 解决方案 > 无法在 react-native 中安装应用程序

问题描述

安卓

我的应用程序在某些 js 文件进行一些更改之前和之后运行完美,出现此错误

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: INSTALL_FAILED_INSUFFICIENT_STORAGE

* 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 1m 0s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Unable to install C:\projects\Maheema\android\app\build\outputs\apk\debug\app-debug.apk

标签: androidreact-native

解决方案


尝试

Gradlew clean 

在项目的 android 目录中,然后再次在设备上运行。


推荐阅读