您的位置:首页 > 教育 > 锐评 > 修改 app id - 鸿蒙 HarmonyOS Next

修改 app id - 鸿蒙 HarmonyOS Next

2024/10/6 8:23:44 来源:https://blog.csdn.net/survivorsfyh/article/details/139919939  浏览:    关键词:修改 app id - 鸿蒙 HarmonyOS Next

修改项目 app id 后通过真机 build run 的时候抛出了如下异常;
项目中更改后的配置与真机的不匹配;

{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 即可


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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com