v10.51.1
Fix: Android build failure on RN 0.87 (AGP 9)
10.51.0 fails the very first build in projects created on or upgraded to RN 0.87:
A problem occurred configuring project ':react-native-update':
> Build Type debug contains custom resource values, but the feature is disabled.
AGP 9 flipped the default of the resValues build feature to off for library modules, while this library relies on resValue to write pushy_build_time. This release re-enables the feature in the library's gradle the way AGP's release notes recommend (guarded on AGP ≥ 4, so older projects configure exactly as before):
buildFeatures {
resValues true
}This idiom is not deprecated and is not on AGP 10's removal list — it is the long-term form. What AGP 10 removes are the android.newDsl / android.builtInKotlin transition opt-outs in the app template, which do not involve this library.
Verified end-to-end on RN 0.87.0 with an Android emulator against production: build, native package upload, hot update publish, binding-time dependency validation, native cold-start check (downloads, then correctly leaves activation to JS), JS short-circuiting onto the natively completed download, restart into the new bundle, markSuccess.
RN 0.87 does not change the Hermes bytecode format (HBC 98 since ~0.84), so hot update bundles and runtimes remain compatible.
Everything else is identical to 10.51.0. RN 0.87 users should upgrade straight to this version.
修复:RN 0.87(AGP 9)下无法构建 Android
10.51.0 在 RN 0.87 新建或升级的项目上会在第一次构建就失败:
A problem occurred configuring project ':react-native-update':
> Build Type debug contains custom resource values, but the feature is disabled.
原因是 AGP 9 把 library 模块的 resValues 特性默认值从开翻到关,而本库依赖 resValue 写入 pushy_build_time。本版在库的 gradle 中按官方推荐方式显式启用该特性(带 AGP ≥ 4 守卫,老项目行为不变):
buildFeatures {
resValues true
}该写法未被弃用、也不在 AGP 10 的移除清单上,可长期使用。AGP 10 将移除的是应用模板里的 android.newDsl / android.builtInKotlin 过渡开关,与本库无关。
已在 RN 0.87.0 + Android 模拟器上实测完整链路:构建、上传原生包、发布热更、绑定期依赖校验、原生冷启动检测(下载后将激活权正确留给 JS)、JS 复用原生已完成的下载、重启生效、markSuccess。
RN 0.87 未更改 Hermes 字节码格式(约 0.84 起均为 HBC 98),热更包与运行时无兼容性问题。
其余功能与 10.51.0 相同。RN 0.87 用户请直接升级到本版。