Skip to content

v10.59.2

Choose a tag to compare

@sunnylqm sunnylqm released this 03 Oct 15:54
5ffab20

English

Android: in-app APK installation works again

  • Fixed downloadAndInstallApk failing on every Android version since 10.53.0. The APK downloaded fine, but staging it rejected with APK_INSTALL_FAILED: Unable to stage APK installation and the system install screen never appeared. The installer committed the PackageInstaller session while the APK write stream was still open, and the system refuses that (SecurityException: Files still open) and abandons the session. The stream is now closed before the session is committed.
  • Affected versions: 10.53.0 to 10.59.1 (when APK installation moved to PackageInstaller). 10.52.x and earlier use the previous install path and are not affected. iOS and HarmonyOS are not affected.
  • This is a native change: rebuild the Android app with 10.59.2 and ship it through your store or sideload channel. A JS-only update cannot fix an installed app, so users on an affected build need to install the fixed build once by other means (store, website download, etc.); in-app APK updates work from that build onward.

Full changelog

中文

Android:应用内 APK 安装恢复可用

  • 修复 10.53.0 起 downloadAndInstallApk 在所有 Android 版本上都会失败的问题。APK 能正常下载完成,但安装阶段会以 APK_INSTALL_FAILED: Unable to stage APK installation 失败,系统安装界面不出现。原因是安装时在 APK 写入流尚未关闭时就提交了 PackageInstaller 会话,系统会拒绝提交(SecurityException: Files still open)并放弃该会话。现在先关闭写入流,再提交会话。
  • 受影响版本:10.53.0 至 10.59.1(APK 安装改用 PackageInstaller 之后的版本)。10.52.x 及更早版本用的是旧的安装方式,不受影响。iOS 和鸿蒙不受影响。
  • 这是原生改动:需要用 10.59.2 重新构建 Android 应用,并通过应用商店或直装渠道发布。JS 热更新无法修复已安装的应用,所以已经装了受影响版本的用户需要通过其他途径(应用商店、官网下载等)安装一次修复后的版本,此后应用内 APK 更新即可正常使用。

完整变更记录