在大型的项目中会将一些公共的功能拆解为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",