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

相关推荐
A***07172 小时前
HarmonyOS在智能家居中的安防系统
华为·智能家居·harmonyos
爱笑的眼睛113 小时前
HarmonyOS Scroll滚动容器深度性能优化实践
华为·harmonyos
6***x5455 小时前
HarmonyOS在智能穿戴中的健康提醒
华为·harmonyos
x***J3485 小时前
HarmonyOS在智能车载中的Huawei HiCar
华为·harmonyos
周倦岚5 小时前
【HarmonyOS】后台任务
华为·harmonyos
lqj_本人6 小时前
鸿蒙Qt生命周期:后台被杀后的数据自救
qt·华为·harmonyos
G***66916 小时前
HarmonyOS在智能家居中的Huawei SmartHome
华为·智能家居·harmonyos
t***D2646 小时前
HarmonyOS分布式安全
安全·华为·harmonyos
9***P3347 小时前
HarmonyOS多语言支持
华为·harmonyos
2***57427 小时前
HarmonyOS在智能穿戴中的生物识别
华为·harmonyos