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

相关推荐
花开彼岸天~37 分钟前
Flutter跨平台开发鸿蒙化定位服务组件使用指南
flutter·开源·harmonyos
特立独行的猫a1 小时前
移植开源软件Notepad--(NDD)到鸿蒙PC:环境搭建与配置
notepad++·开源软件·harmonyos·鸿蒙pc·notpad--
鸿蒙开发工程师—阿辉2 小时前
HarmonyOS 上下文的使用: 脱离 UI 怎么用 Context?
ui·华为·harmonyos
FrameNotWork3 小时前
HarmonyOS 教学实战(八):后台任务、Worker 与任务调度
华为·harmonyos
¥-oriented4 小时前
【鸿蒙相关活动】
harmonyos
lzhdim5 小时前
华为手机介绍
华为·智能手机
梦想不只是梦与想5 小时前
鸿蒙中 倒计时实现方法
华为·harmonyos·鸿蒙·setinterval·texttimer
sinat_3842410915 小时前
HarmonyOS音乐播放器开发实战:从零到一打造完整鸿蒙系统音乐播放器应用 2
华为·gitlab·intellij-idea·harmonyos·visual studio·webstorm
waeng_luo17 小时前
HarmonyOS开发-多线程与异步编程
harmonyos·鸿蒙2025领航者闯关·鸿蒙6实战·#鸿蒙2025领航者闯关
花开彼岸天~18 小时前
鸿蒙平台使用 `video_thumbnail` 插件指南
华为·harmonyos