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).
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
HarmonyOS
2024-12-28 07:54:50
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
Heiang

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

分享
微博
QQ
微信
回复
2024-12-28 10:52:57
相关问题
HarmonyOS 集成HSP如何访问rawfile资源
610浏览 • 1回复 待解决
HarmonyOS 集成HSP和har有什么区别
741浏览 • 1回复 待解决
HarmonyOS 使用hvigorw编译失败
1063浏览 • 1回复 待解决
hsp 分类集成相关问题
849浏览 • 1回复 待解决
HarmonyOS 集成自定义HSP问题
1286浏览 • 2回复 待解决
Hsp使用图片 编译不通过
2455浏览 • 1回复 待解决
HSP调用getRawFileContent失败
1495浏览 • 1回复 待解决
使用一键登录hsp包,编译报错
997浏览 • 1回复 待解决
HarmonyOS 编译失败问题
1259浏览 • 1回复 待解决
HarmonyOS 引入har编译失败
1077浏览 • 1回复 待解决
stateStyles如何使用selected(选中
947浏览 • 1回复 待解决
HarmonyOS HSP间接依赖拉取资源失败
650浏览 • 1回复 待解决
编译release包失败
1262浏览 • 1回复 待解决