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


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

相关推荐
以太浮标4 小时前
华为eNSP模拟器综合实验之- ACL控制列表核心命令全解析及场景应用
运维·网络·网络协议·华为·信息与通信
特立独行的猫a5 小时前
CMake与GN构建系统对比及GN使用指南
harmonyos·cmake·openharmony·构建·gn
SuperHeroWu715 小时前
如何判断应用在鸿蒙卓易通或者出境易环境下?
华为·harmonyos
大雷神16 小时前
HarmonyOS APP<玩转React>开源教程十五:首页完整实现
react.js·开源·harmonyos
云和数据.ChenGuang17 小时前
鸿蒙智联,极智共生:HarmonyOS与MiniMax智能体的融合新纪元
华为·harmonyos·鸿蒙
不爱吃糖的程序媛17 小时前
已有 Flutter 应用适配鸿蒙平台指导文档
flutter·华为·harmonyos
大雷神17 小时前
HarmonyOS APP<玩转React>开源教程十六:课程列表页面
harmonyos
弓.长.18 小时前
ReactNative for OpenHarmony项目鸿蒙化三方库:react-native-video — 视频播放组件
react native·音视频·harmonyos
坚果派·白晓明18 小时前
在 Ubuntu 中搭建鸿蒙 PC 三方库交叉编译构建开发环境
ubuntu·华为·harmonyos
弓.长.18 小时前
ReactNative for OpenHarmony项目鸿蒙化三方库:react-native-webview — 网页渲染组件
react native·react.js·harmonyos