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


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

相关推荐
麟听科技13 小时前
HarmonyOS 6.0+ APP智能种植监测系统开发实战:农业传感器联动与AI种植指导落地
人工智能·分布式·学习·华为·harmonyos
前端不太难14 小时前
HarmonyOS PC 焦点系统重建
华为·状态模式·harmonyos
空白诗15 小时前
基础入门 Flutter for Harmony:Text 组件详解
javascript·flutter·harmonyos
lbb 小魔仙15 小时前
【HarmonyOS】React Native实战+Popover内容自适应
react native·华为·harmonyos
motosheep16 小时前
鸿蒙开发(四)播放 Lottie 动画实战(Canvas 渲染 + 资源加载踩坑总结)
华为·harmonyos
左手厨刀右手茼蒿16 小时前
Flutter for OpenHarmony 实战:Barcode — 纯 Dart 条形码与二维码生成全指南
android·flutter·ui·华为·harmonyos
lbb 小魔仙16 小时前
【HarmonyOS】React Native of HarmonyOS实战:手势组合与协同
react native·华为·harmonyos
果粒蹬i17 小时前
【HarmonyOS】React Native实战项目+NativeStack原生导航
react native·华为·harmonyos
waeng_luo18 小时前
HarmonyOS 应用开发 Skills
华为·harmonyos
石去皿18 小时前
分布式原生:鸿蒙架构哲学与操作系统演进的范式转移
分布式·架构·harmonyos