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


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

相关推荐
●VON11 小时前
补充说明:Windows 完全可以开发 Qt 鸿蒙应用!(附专属适配方案)
windows·qt·华为·harmonyos·鸿蒙
Fanmeang11 小时前
华为SRv6技术:引领IP网络进入新时代的智能导航系统
运维·网络·华为·vpn·ipv6·srv6
东林知识库13 小时前
鸿蒙5:HarmonyOS应用开发-线程模型
华为·harmonyos
猫林老师13 小时前
Flutter for HarmonyOS开发指南(九):测试、调试与质量保障体系
flutter·wpf·harmonyos
Keya13 小时前
鸿蒙Next系统手机使用Charles配置证书并抓包教程
前端·harmonyos
爱笑的眼睛1113 小时前
HarmonyOS DataShare数据共享机制深度解析:构建分布式应用的数据桥梁
华为·harmonyos
猫林老师14 小时前
Flutter for HarmonyOS开发指南(五):性能调优与性能分析全攻略
flutter·华为·harmonyos
BlackWolfSky14 小时前
鸿蒙文件操作
macos·华为·harmonyos·鸿蒙
爱笑的眼睛1114 小时前
深入理解HarmonyOS Calendar组件:高级日期选择实现与优化
华为·harmonyos
╰つ栺尖篴夢ゞ14 小时前
HarmonyOS之深入解析如何实现语音朗读能力
华为·api·harmonyos next·语音朗读