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


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

相关推荐
我在看你呵呵笑12 小时前
GD32VW553-IOT开发板移植适配openharmony
物联网·华为·harmonyos
在人间耕耘13 小时前
HarmonyOS 开发学习分享:从入门到认证的完整路径
华为·harmonyos
森之鸟13 小时前
开发中使用——鸿蒙子页面跳转到指定Tab页面
harmonyos·鸿蒙
程序员潘Sir15 小时前
HarmonyOS编写教师节贺卡
harmonyos·鸿蒙
℃CCCC17 小时前
请求库-axios
开发语言·华为·网络请求·harmonyos·deveco studio·axios请求·arkts编程
光芒Shine19 小时前
【ArkTS-装饰器】
harmonyos
花先锋队长19 小时前
从社交破冰到学习规划,鸿蒙5开启智慧校园新生活
华为·生活·harmonyos
Cheney82221 小时前
华为Ai岗机考20250903完整真题
人工智能·华为
用户7227868123441 天前
HarmonyOS实现快递APP自动识别地址
harmonyos