CodePushHash 文件找不到

升级gradle到3.2.0后,编译react-native-code-push项目出现'CodePushHash'文件找不到的错误。react-native-code-push版本5.4.2,react-native版本0.56.1。解决方法是在项目的build.gradle中添加特定代码段,以应对Gradle Plugin 3.2.0+的变化。此问题在国外论坛已有讨论。
摘要由CSDN通过智能技术生成

Error: ENOENT: no such file or directory, open '/Users/me/myproject/android/app/build/intermediates/assets/debug/CodePushHash'

gradle 升级到3.2.0后编译打包结果报错

  • react-native-code-push version: 5.4.2
  • react-native version: 0.56.1

折腾好久,发现

I've created a new react-native 0.56.1 (gradle plugin 3.1.4) app and that stage was also skipped: :app:bundleDebugJsAndAssets SKIPPED,
but the /build/intermediates/assets/debug/ folder was still created properly, so I guess it's now the reason.

Then I've tried gradle plugin 3.2.1 and finally reproduced the issue. (It's because Gradle Plugin 3.2 uses a new intermediates/merged_assets directory instead of intermediates/assets)

So if you are using gradle plugin 3.2+ it's also better to use react native 0.57.2+ for 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值