Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

今天继续做公司安排的安卓项目时,yarn android运行项目后发现出现了这个错误,刚开始百思不得其解,我也没改什么配置。。然后细细看了看错误信息,定位到了位置。原来是我把package.json中一个不用的包删除掉后没有删掉其他依赖的信息,导致项目运行起来没找到这个包从而报错。

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
D:\workspace_idea\work_project\6.code\LegalApp\android\app\src\main\java\com\legalapp\MainApplication.java:7: ����: �����ui.fileselector���
���
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

错误就在:
D:\workspace_idea\work_project\6.code\LegalApp\android\app\src\main\java\com\legalapp\MainApplication.java:7: ����: �����ui.fileselector���
���
把没用的import去掉即可。
在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值