-
Creator 版本: cocoscreator3.8
-
目标平台: Android
-
重现方式:先将预制物放在resoucres下打包,然后再将预制物移动到别的bundle下再热更必现ERROR_UPDATING
updateCallback(event): void {var updateOver = false; var failed = false; switch (event.getEventCode()) { case jsb.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST: this.showLog("没有发现本地manifest文件,跳过了热更新."); failed = true; break; //更新进度 case jsb.EventAssetsManager.UPDATE_PROGRESSION: let percent = event.getPercent(); if (isNaN(percent)) return; var msg = event.getMessage(); this.disPatchRateEvent(percent); this.showLog("updateCallback更新进度:" + percent + ', msg: ' + msg); break; //下载manifest文件失败,跳过热更新 case jsb.EventAssetsManager.ERROR_DOWNLOAD_MANIFEST: case jsb.EventAssetsManager.ERROR_PARSE_MANIFEST: this.showLog("下载manifest文件失败,跳过热更新."); failed = true; break; //已是最新版本 case jsb.EventAssetsManager.ALREADY_UP_TO_DATE: this.showLog("已是最新版本."); updateOver = true; break; //更新结束 case jsb.EventAssetsManager.UPDATE_FINISHED: this.showLog("更新结束." + event.getMessage()); this.disPatchRateEvent(1); updateOver = true; break; //更新错误 case jsb.EventAssetsManager.UPDATE_FAILED: this.showLog("更新错误." + event.getMessage()); this._updating = false; this._canRetry = true; this._failCount++; this.retry(); break; //更新过程中错误 case jsb.EventAssetsManager.ERROR_UPDATING: this.showLog('更新过程中错误: ' + event.getAssetId() + ', ' + event.getMessage()); break; //解压错误 case jsb.EventAssetsManager.ERROR_DECOMPRESS: this.showLog('解压错误'); break; default: break; } if (failed) { this._am.setEventCallback(null); this._updating = false; this.hotUpdateFinish(false); } if (updateOver) { this.hotUpdateFinish(true); }}
-
首个报错:----更新过程中错误: assets/res/import/0d/0d5cf70e6.json, Not Found
-
重现概率:必现