HarmonyOS 鸿蒙Next flutter插件适配真机编译报错

发布于 1周前 作者 songsunli 来自 鸿蒙OS

HarmonyOS 鸿蒙Next flutter插件适配真机编译报错

Device info:HUAWEI Mate 60 Pro

Build info:ALN-AL00 5.0.0.26(SP8DEVC00E29R4P6log)

Fingerprint:e71216075b652cb6c5199b6446e7d8e5b96a48ee4b3ef4f8919773c590c4859b

Module name:com.example.volc_engine_rtc_example

Version:1.0.0

VersionCode:1000000

PreInstalled:No

Foreground:No

Pid:53424

Uid:20020126

Reason:ReferenceError

Error name:ReferenceError

Error message:cannot find record ‘com.example.volc_engine_rtc_example/entry@volc_engine_rtc/index’, please check the request path.’/data/storage/el1/bundle/entry/ets/modules.abc’.

Stacktrace:

Cannot get SourceMap info, dump raw stack:

#01 pc 0000000000288c13 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#02 pc 0000000000161433 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#03 pc 0000000000160fdb /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#04 pc 00000000001d2ceb /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#05 pc 00000000004c992f /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#06 pc 00000000004c3aa3 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#07 pc 0000000000471c27 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#08 pc 000000000046435b /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#09 pc 00000000004690ef /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#10 pc 000000000046912b /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#11 pc 0000000000468e23 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#12 pc 0000000000382407 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#13 pc 000000000038281f /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#14 pc 00000000004b36e7 /system/lib64/platformsdk/libark_jsruntime.so(b47229c50465caa19d21d9ec0db52e5c)

#15 pc 000000000003913b /system/lib64/platformsdk/libace_napi.z.so(9c97d173ea060df8c1c6e0fe75082936)

8 回复
楼主您好,您可以参考下flutter在OpenHarmony平台的示例demo:https://gitee.com/openharmony-sig/flutter_samples

Error message:cannot find record 'com.example.app_flutter/entry[@xmpp_connection](/user/xmpp_connection)/index', please check the request path.'/data/storage/el1/bundle/entry/ets/modules.abc'.请问这个问题如何解决呢?

也遇到了同样问题
Flutter官方支持鸿蒙了吗?

应该适配了,上面那个问题我解决了,现在启动真机白屏。。。一步一坑

期待HarmonyOS能在未来推出更多针对特定场景的优化功能。

请问 上面那个问题是如何解决的呢?

HarmonyOS 鸿蒙Next flutter插件适配真机编译报错可能由多种原因引起,如环境变量配置错误、SDK版本不兼容、插件依赖问题等。建议检查以下几点:

  1. 确保环境变量(如OHOS_SDK_HOME)正确设置并指向HarmonyOS SDK的根目录。
  2. 检查flutter和HarmonyOS SDK的版本是否兼容,并尝试更新到最新版本。
  3. 清理并重新构建项目,确保所有依赖正确安装。
  4. 查看报错信息,定位具体问题,并参考官方文档或社区资源解决。

如果问题依旧没法解决请加我微信,我的微信是itying888。

回到顶部