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

相关推荐
2501_921930832 小时前
基础入门 React Native 鸿蒙跨平台开发:react-native-button三方库适配
react native·react.js·harmonyos
一起养小猫10 小时前
Flutter for OpenHarmony 进阶:体育计分系统与数据持久化深度解析
flutter·harmonyos
mocoding13 小时前
flutter通信小能手pigeon三方库已完成鸿蒙化适配
flutter·华为·harmonyos
一起养小猫13 小时前
Flutter for OpenHarmony 实战:2048游戏完整开发指南
flutter·游戏·harmonyos
仓颉编程语言14 小时前
鸿蒙仓颉编程语言挑战赛一等奖作品:MeetAI-基于Cangjie的智能会后整理助手
华为·鸿蒙·仓颉编程语言
大雷神15 小时前
HarmonyOS智慧农业管理应用开发教程--高高种地--第31篇:桌面小组件开发
华为·harmonyos
一起养小猫16 小时前
Flutter for OpenHarmony 实战:排球计分系统完整开发指南
flutter·harmonyos
人工智能知识库17 小时前
华为HCCDA-AI人工智能入门级开发者题库(带详细解析)
人工智能·华为·hccda-ai题库·hccda-ai
一起养小猫18 小时前
Flutter for OpenHarmony 实战:推箱子游戏完整开发指南
flutter·游戏·harmonyos
浩宇软件开发19 小时前
基于OpenHarmony鸿蒙开发诗中华词鉴赏APP
harmonyos·arkts·arkui