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",

相关推荐
IT从业者张某某6 小时前
【鸿蒙PC命令行适配】GitUI 移植的工程实践:双 Git 引擎(libgit2/gitoxide)的鸿蒙适配之路
git·华为·harmonyos
lqj_本人6 小时前
WinPcap 鸿蒙 PC 适配全记录:从 NPF 原始抓包到 VPN_TUN 与 libpcap 双通路
qt·华为·harmonyos
●VON7 小时前
Flutter 鸿蒙插件适配实战:用 device_screen_brightness 2.0.0 控制并监听屏幕亮度
flutter·华为·harmonyos
ChinaDragon7 小时前
HarmonyOS:应用横竖屏切换
harmonyos
颜颜yan_8 小时前
ESP-IDF 鸿蒙 PC 适配全记录:打通 Python、构建工具链与 ESP32-P4 固件生成
python·华为·harmonyos
梦想不只是梦与想10 小时前
鸿蒙 邀请测试:AppGallery邀请测试流程
harmonyos·appgallery 邀请测试·邀请测试
贾伟康13 小时前
【口算王|02】HarmonyOS ArkTS 答题提交实战:防止重复提交并推进下一题
harmonyos·arkts·状态管理·arkui·幂等设计
承渊政道15 小时前
Python IDLE鸿蒙PC适配全记录:从Tkinter桌面程序到ArkUI原生开发闭环
开发语言·python·harmonyos·鸿蒙系统·桌面程序
万物智能信息科技16 小时前
电容触摸 FT5406,另一颗芯片、同一条总线—【万物智能之开源鸿蒙OpenHarmony系统实战开发系列教程】
人工智能·华为·开源·harmonyos·鸿蒙
ChinaDragonDreamer16 小时前
HarmonyOS:应用程序包管理模块(获取当前应用信息)
harmonyos·鸿蒙