修改 app id - 鸿蒙 HarmonyOS Next

修改项目 app id 后通过真机 build run 的时候抛出了如下异常;

项目中更改后的配置与真机的不匹配;

TypeScript 复制代码
{
  app: {
    bundleName: "com.xxxxxx.xxx_harmony",
    vendor: "xxxxxx",
    versionCode: 1,
    versionName: "3.5.00",
    icon: "$media:app_icon",
    label: "$string:app_name",
  },
}

修改后直接 build 可能会抛出如下异常:

需重新配置下签名即可

复制代码
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.xxxxxx.xxx_harmony, BundleName in SigningConfigs: com.example.xxx_harmony.

解决办法

重新配置签名方式如下:

将现有 build-profile.json5 中的 signingConfigs 清空;

重新 new 新的配置后, Run 即可


以上便是此次分享的全部内容,希望能对大家有所帮助!

相关推荐
Demisse5 小时前
[华为eNSP] OSPF综合实验
网络·华为
Georgewu6 小时前
【HarmonyOS 5】桌面快捷方式功能实现详解
harmonyos
娅娅梨7 小时前
HarmonyOS-ArkUI 自定义弹窗
华为·harmonyos·arkts·arkui
陈奕昆8 小时前
3.3 HarmonyOS NEXT原子化服务开发:卡片设计、轻量部署与场景化编排实战
华为·harmonyos
上海张律师12 小时前
鸿蒙ArkTS+ArkUI仿微信消息列表页制作
harmonyos
Humbunklung16 小时前
关于华为仓颉编程语言
华为·cangjie
王二蛋与他的张大花19 小时前
HarmonyOS运动开发:如何用mpchart绘制运动配速图表
harmonyos
程序员小刘19 小时前
【HarmonyOS 5】生活与服务开发实践详解以及服务卡片案例
华为·生活·harmonyos
小草帽学编程1 天前
鸿蒙Next开发真机调试签名申请流程
android·华为·harmonyos