2

描述

我正在使用 Ionic 2 的 Ionic 本机代码推送库。当我使用 codepush 部署应用程序时,应用程序(在 Android 上)下载更新但安装失败。“无法计算包的哈希”问题的原因通常是什么?

这是我的日志:

[CodePush] Installing update
codePushUtil.js:36 [CodePush] Applying diff update
codePushUtil.js:36 [CodePush] Verifying hash for folder path: /codepush/deploy/versions/80577a164814d7e257b6e0cfac86890ee06b51617eb56d27d4fa8baf4af1a785/
codePushUtil.js:40 [CodePush]  Unable to compute hash for package: An error occurred when trying to get the hash of the binary contents. invalid directory path /data/user/0/com.outplayed.tycho/files/codepush/deploy/versions/80577a164814d7e257b6e0cfac86890ee06b51617eb56d27d4fa8baf4af1a785/www

这是我在主 ts 文件中的代码:

 constructor(public plt: Platform, private codePush: CodePush) {
    if (this.plt.is('cordova')) {
      // Don't run codepush in browser.
      this.plt.ready().then((readySource) => {
        const downloadProgress = (progress) => { console.log(`Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`); }
        this.codePush.sync({}, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));
      });
    }
  }

附加信息

  • 科尔多瓦插件代码推送版本:1.10.0-beta
  • Cordova 版本:Cordova android 6.3.0
4

0 回答 0