HarmonyOS RN使用Metro服务加载bundle

HarmonyOS RN使用Metro服务加载bundle,加载jsbundle失败。

异常信息:

Error: Couldn't load JSBundle from http://localhost:8081/index.bundle?platform=harmony&dev=true&minify=false@56bc3a17
  • 1.
HarmonyOS
2025-01-10 09:54:05
1.0w浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
put_get

jsBundle未解析完就开始渲染RN页面,修改方案如下:

export struct QRNEntryPage {
  build() {
    Stack() {
      if (this.isBundleReady) {
        HomePage()
      }
    }
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
分享
微博
QQ
微信
回复
2025-01-10 12:23:42


相关问题
RN工程,Metrobundle无法识别应用
749浏览 • 1回复 待解决
HarmonyOS RN功能依赖包加载失败
532浏览 • 1回复 待解决
HarmonyOS AGC预加载服务
634浏览 • 1回复 待解决
HarmonyOS RN使用lottie库
384浏览 • 1回复 待解决
HarmonyOS 加载RN沙盒路径资源文件
578浏览 • 1回复 待解决
HarmonyOS RN中能否使用NativeEventEmitter?
297浏览 • 1回复 待解决
HarmonyOS 图片的加载与压缩服务
595浏览 • 0回复 待解决
HarmonyOS 图片的加载与压缩服务
613浏览 • 1回复 待解决
HarmonyOS RN使用datetimePicker显示不支持
485浏览 • 1回复 待解决