Hap包引用的Hsp报签名错误怎么解决

在大型的项目中会将一些公共的功能拆解为HSP包,进行服用和插件化管理,但是在HSP如果不上私库的情况下,要保证HSP的包名和HAP的包名一致:不然会报

两个错误:

第一:包名不一致

将HAP的包名或者HSP的包名修改为一样的,在项目的

AppScope 目录下的app.json5中修改bundleName

第二:签名和包名不一致

修改完以后你会发现还不行,是因为原来你的签名的包名的问题

ERROR: Failed :entry:default@SignHap...

hvigor ERROR: 00303074 Configuration Error

Error Message: BundleName in the project configuration does not match that in the SigningConfigs. At file: C:\DevEcoStudioProjects\HapHsp\build-profile.json5

  • Try the following: Open the project-level build-profile.json5 file. Change the bundleName value to that in the SigningConfigs.

    Go to the app.json5 file and change the bundleName value there.

hvigor ERROR: BUILD FAILED in 1 s 904 ms

解决方案:

打开你的项目结构 ---签名的地方-- 就这个然后按这个方案

最后在你的项目的builld-profile.json5 中进行修改你对应的签名,比如:

"products": [

{

"name": "default",

"signingConfig": "712",

相关推荐
花椒技术1 天前
HJPusher / HJPlayer SDK 实践:我们为什么把直播推播链路拆成一套可复用能力
设计模式·harmonyos·直播
一维Ace2 天前
HarmonyOS ArkTS 按钮组件全解:Button、Toggle 状态交互实战
harmonyos
anyup3 天前
来简单聊聊鸿蒙开发,万元奖金的事~
前端·华为·harmonyos
Georgewu3 天前
【无测试机别害怕】华为云鸿蒙云手机南:从零到联调全流程详解
harmonyos
Georgewu3 天前
【HarmonyOS 7】DevEco Code安装与使用
harmonyos
Georgewu3 天前
【HarmonyOS 7】鸿蒙应用开发如何屏蔽剪切板
harmonyos
谷子在生长4 天前
纯血鸿蒙自定义弹窗最佳实践:从「到处复制」到「一行调用」
前端·harmonyos
小魔女千千鱼5 天前
把 Go 塞进鸿蒙PC:windows上用 c-shared 跑 2048
harmonyos
TrisighT5 天前
Electron 跑在鸿蒙 PC 上,单窗口和多窗口内存差 800MB?我抓了 5 组数据
性能优化·electron·harmonyos