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


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

相关推荐
赵健zj8 小时前
鸿蒙 emitter 和 eventHub 的区别
华为·harmonyos
yenggd9 小时前
华为多级m-lag简单配置案例
网络·华为
qq_3863226910 小时前
华为网路设备学习-34(BGP协议 九)BGP路由 选路规则二
服务器·学习·华为
逻极17 小时前
HarmonyOS 5 鸿蒙应用性能优化与调试技巧
华为·性能优化·harmonyos·鸿蒙
Kevin Coding17 小时前
鸿蒙实现可以上下左右滑动的表格-摆脱大量ListScroller
华为·harmonyos
周倦岚19 小时前
【HarmonyOS】组件嵌套优化
harmonyos
我是华为OD~HR~栗栗呀1 天前
华为od-22届考研-测试面经
java·c++·python·功能测试·华为od·华为·面试
安卓开发者1 天前
鸿蒙Next Test Kit:一站式自动化测试框架详解
华为·harmonyos
weixin_404611341 天前
鸿蒙flutter 老项目到新项目的遇到迁移坑点
flutter·华为·harmonyos
fatiaozhang95271 天前
晶晨S905L3SB芯片_安卓9.0_高安版_支持外置WIFI_线刷固件包
android·华为·电视盒子·刷机固件·机顶盒刷机