我正在尝试安装react本机图像选择器,但出现此错误



我正在尝试安装图像选择器,它已经安装好了。但是之后运行android这个错误被抛出。当我从json包中删除已安装的图像选择器行时,问题得到了解决。如何解决此问题?

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Unable to delete directory 'D:ReactOMWprojectomw_mobile2onmyway_mobileOnMyWayandroidappbuildgeneratednot_namespaced_r_class_sourcesdebugrandroidxappcompat' after 10 attempts
* 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 47s
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
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! OnMyWay@0.0.1 android: `react-native run-android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the OnMyWay@0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersadminAppDataRoamingnpm-cache_logs2020-07-18T03_05_08_404Z-debug.log

您需要清理项目

生成>清洁项目

然后重新构建您的项目

最新更新