HarmonyOS 鸿蒙Next 升级最新开发工具devecostudio-windows-5.0.5.200后导入SDK报错:Error message: cannot find record '&@ohos/protobufjs/src/main/ets/dist/pr
HarmonyOS 鸿蒙Next 升级最新开发工具devecostudio-windows-5.0.5.200后导入SDK报错:Error message: cannot find record ‘&@ohos/protobufjs/src/main/ets/dist/pr
升级最新的开发工具devecostudio-windows-5.0.5.200后导入SDK报错:Error message:cannot find record ‘&@ohos/protobufjs/src/main/ets/dist/protobuf&2.1.0’, please check the request path.’/data/storage/el1/bundle/entry/ets/modules.abc’.
有大佬知道是什么问题导致吗?
Device info:emulator
Build info:emulator 5.0.0.106(SP3DEVC00E106R4P11log)
Fingerprint:7c88dc77c20b2f33ef09f4ee6e78d7afc2040989d834fc59e404d2cb2f8a7832
Module name:com.ericple.ohbill
Version:1.0.0
VersionCode:1000000
PreInstalled:No
Foreground:No
Pid:6811
Uid:20020048
Reason:ReferenceError
Error name:ReferenceError
Error message:cannot find record ‘&@ohos/protobufjs/src/main/ets/dist/protobuf&2.1.0’, please check the request path.’/data/storage/el1/bundle/entry/ets/modules.abc’.
Stacktrace:
SourceMap is not initialized yet
#01 pc 000000000077e6c7 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#02 pc 000000000035f49c /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#03 pc 00000000001e26b8 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#04 pc 00000000001e1f11 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#05 pc 000000000027bcc1 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#06 pc 00000000006568e5 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#07 pc 0000000000652fee /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#08 pc 00000000005ceda9 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#09 pc 00000000005bb43e /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#10 pc 00000000005c1689 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#11 pc 00000000005c1438 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#12 pc 00000000005c16d4 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#13 pc 00000000005c1438 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#14 pc 00000000005c16d4 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
#15 pc 00000000005c1438 /system/lib64/platformsdk/libark_jsruntime.so(6ac7316e85269dc6f57ff28f5b19aa10)
解决方法:动态加载-ArkTS模块化-ArkTS运行时-ArkTS(方舟编程语言)-应用框架 - 华为HarmonyOS开发者 (huawei.com)请按照链接动态加载写法进行检查。
大佬,请问下我这个问题该怎么配置啊?
大佬,我这个是SDK引用了谷歌protobufjs编码,然后调用第三库生成了TS和JS文件,然后我打成har包时这个JS文件没有在har内。然后第三项目引入这个har包启动的时候就报以上错误。不知道是不是这个问题导致的
针对您提到的HarmonyOS鸿蒙Next在升级最新开发工具DevEco Studio到5.0.5.200版本后导入SDK出现的报错问题,这通常是由于SDK路径配置错误或SDK文件缺失引起的。以下是一些可能的解决步骤:
-
检查SDK路径:确保在DevEco Studio中配置的SDK路径正确无误,且该路径下包含所有必要的文件和目录。
-
重新下载SDK:尝试重新从官方渠道下载SDK,确保下载的是与您的HarmonyOS版本兼容的SDK。
-
清理缓存:在DevEco Studio中执行“File” > “Invalidate Caches / Restart…” > “Invalidate and Restart”以清理缓存并重启IDE。
-
检查环境变量:确保系统的环境变量中包含了指向SDK的路径,特别是JAVA_HOME和相关的PATH设置。
-
日志分析:查看DevEco Studio的日志文件,可能会提供更多关于错误原因的线索。
如果问题依旧没法解决请联系官网客服,官网地址是:https://www.itying.com/category-93-b0.html