HarmonyOS 使用集成态 HSP 时,编译失败

想发布一个集成态HSP,然后在 oh-package.json5 的 name 中设置带 scope 的名字,比如 @custom/myhsp,就会出现如下的错误(不带 scope 能正常编译):

> hvigor ERROR: Failed :testhsp:default@CompileArkTS...
> hvigor ERROR: Cannot read properties of undefined (reading 'bundleName')
1 ERROR:  ArkTS:ERROR Failed to resolve OhmUrl.
Error Message: Failed to get a resolved OhmUrl for "/Volumes/s1/harmonyProjects/TestPublishApp/testhsp/Index.ets" imported by "undefined".


  * Try the following:
> Check whether the module which /Volumes/s1/harmonyProjects/TestPublishApp/testhsp/Index.ets belongs to is correctly configured.
> Check the corresponding file name is correct(including case-sensitivity).
HarmonyOS
2024-12-28 07:54:50
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
Heiang

可以将debuggable参数设置为true,以启用可调试模式

分享
微博
QQ
微信
回复
2024-12-28 10:52:57
相关问题
HarmonyOS 集成HSP如何访问rawfile资源
150浏览 • 1回复 待解决
HarmonyOS 集成HSP和har有什么区别
226浏览 • 1回复 待解决
HarmonyOS 使用hvigorw编译失败
396浏览 • 1回复 待解决
hsp 分类集成相关问题
492浏览 • 1回复 待解决
HarmonyOS 集成自定义HSP问题
410浏览 • 1回复 待解决
Hsp使用图片 编译不通过
2020浏览 • 1回复 待解决
使用一键登录hsp包,编译报错
588浏览 • 1回复 待解决
HSP调用getRawFileContent失败
1125浏览 • 1回复 待解决
HarmonyOS 编译失败问题
551浏览 • 1回复 待解决
stateStyles如何使用selected(选中
641浏览 • 1回复 待解决
HarmonyOS 引入har编译失败
357浏览 • 1回复 待解决
编译release包失败
574浏览 • 1回复 待解决
HarmonyOS HSP间接依赖拉取资源失败
238浏览 • 1回复 待解决