修改 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 即可


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

相关推荐
2501_919749036 小时前
鸿蒙:用Toggle组件实现选择框、开关样式
华为·harmonyos
熊猫钓鱼>_>6 小时前
ArkTS 深度解析:鸿蒙生态的基石与未来之路
华为·harmonyos
郝晨妤12 小时前
鸿蒙List组件通过拖拽改变排序
华为od·华为·harmonyos·鸿蒙
文火冰糖的硅基工坊13 小时前
[创业之路-691]:历史与现实的镜鉴:从三国纷争到华为铁三角的系统性启示
人工智能·科技·华为·重构·架构·创业
大雷神15 小时前
windows系统实操Flutter鸿蒙环境搭建
华为·harmonyos
2503_9284115616 小时前
10.9 了解鸿蒙生态
华为·harmonyos
安卓开发者16 小时前
FFRT的核心并发范式与样例概览
harmonyos
程序员潘Sir17 小时前
鸿蒙应用开发从入门到实战(二十二):使用Stack实现层叠布局
harmonyos
我是华为OD~HR~栗栗呀18 小时前
华为OD-23届考研-Java面经
java·c++·后端·python·华为od·华为·面试