HarmonyOS 项目更换包名后,运行失败

项目更换包名后,运行失败,运行时报错:

> hvigor ERROR: Failed :logger:default@SignHsp...
> hvigor ERROR: BundleName in the project configuration does not match that in the SigningConfigs.
Detail: Open the project-level build-profile.json5 file. Change the bundleName value
to that in the SigningConfigs. Otherwise, go to the app.json5 file and change the bundleName value there.
BundleName in Project: com.hongmeng.fenqile, BundleName in SigningConfigs: com.harmony.fenqile.
at /Users/xxx/DevEcoStudioProjects/fenqile_harmony/fenqile_harmony_next/build-profile.json5
  > hvigor ERROR: BUILD FAILED in 49 s 111 ms
  > hvigor WARN: Can not getEventById:'e44c136c-086a-42fb-b406-e8b693e34e11' from MetricCacheService.
  > hvigor WARN: Can not getEventById:'2159a5d6-a800-4fab-b1ae-859894abc1c2' from MetricCacheService.
  > hvigor ERROR: Failed :animations:default@SignHsp...
> hvigor ERROR: BundleName in the project configuration does not match that in the SigningConfigs.
Detail: Open the project-level build-profile.json5 file. Change the bundleName value
to that in the SigningConfigs. Otherwise, go to the app.json5 file and change the bundleName value there.
BundleName in Project: com.hongmeng.fenqile, BundleName in SigningConfigs: com.harmony.fenqile.
at /Users/xxx/DevEcoStudioProjects/fenqile_harmony/fenqile_harmony_next/build-profile.json5
HarmonyOS
1天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
superinsect

调整签名配置中的bundleName方法:打开DevEco Studio中的签名配置界面(File > Project Structure > Project > Signing Configs),确保签名配置中的bundleName与项目配置中的bundleName一致。

重新签名:在签名配置界面,勾选“Automatically generate signature”(如果是HarmonyOS工程,需同时勾选“Support HarmonyOS”),然后等待签名完成。

分享
微博
QQ
微信
回复
1天前
相关问题
HarmonyOS 项目接入flutter无法运行
62浏览 • 1回复 待解决
HarmonyOS 添加权限运行安装失败
754浏览 • 1回复 待解决
HarmonyOS项目结构中修改项目
826浏览 • 1回复 待解决
HarmonyOS项目能修改包吗?
657浏览 • 1回复 待解决
HarmonyOS 运行Flutter项目崩溃
34浏览 • 1回复 待解决
新建HarmonyOS项目运行不起来
208浏览 • 1回复 待解决
求大佬告知如何修改项目
460浏览 • 1回复 待解决
鸿蒙项目内嵌apk失败请教
11030浏览 • 3回复 待解决
HarmonyOS 更换图标无效
240浏览 • 2回复 待解决
在虚拟机上运行不了鸿蒙项目
6710浏览 • 1回复 待解决
HarmonyOS 更改项目的bundlename报错
1514浏览 • 1回复 待解决
HarmonyOS 引入RN打包失败
750浏览 • 1回复 待解决