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


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

相关推荐
Lanren的编程日记1 小时前
Flutter鸿蒙应用开发:基础UI组件库设计与实现实战
flutter·ui·harmonyos
chenbin___5 小时前
鸿蒙(HarmonyOS)支持 useNativeDriver的详细说明(转自千问)
前端·javascript·react native·react.js·harmonyos
Georgewu7 小时前
【鸿蒙基础入门】概念理解和学习方法论说明
harmonyos
Georgewu7 小时前
【鸿蒙基础入门】HarmonyOS开发环境IDE和AI编程助手安装配置和默认项目讲解
harmonyos
木斯佳7 小时前
HarmonyOS 6实战:从视频编解码到渲染过程,一文了解鸿蒙音视频数据流向
harmonyos
一条咸鱼¥¥¥8 小时前
【运维笔记】华为防火墙远程接入用户开通与禁用方法
运维·网络·华为·远程用户
云_杰8 小时前
手把手教你玩转HDS沉浸光感效果
华为·harmonyos·ui kit
HwJack209 小时前
HarmonyOS 开发终结“盲盒式”调试:用 hiAppEvent 的 Watcher 接口拿捏应用行为监控
华为·harmonyos
互联网散修9 小时前
鸿蒙实战:用 want.param 实现视频播放器跨端迁移续播
华为·音视频·harmonyos·跨端迁移续播