【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?

GeorgeGcs
发布于 2025-9-1 21:27
浏览
0收藏

【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?

一、问题背景:

hvigor ERROR: Failed :entry:default@SignHap…

hvigor ERROR: Tools execution failed.
09-01 15:21:21 ERROR - The certificate has expired! NotAfter: Sun Aug 10 16:25:28 CST 202509-01 15:21:21 ERRoR - hap-sign-tool: error: The certificate has expired! NotAfter: Sun Aug 10 16:25:28 CST 2025

  • Try the following:

The certificate format is incorrect, please check your appCertFile parameterDetail:Please check the message from tools.

【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?-鸿蒙开发者社区

二、解决方案:

1、首先检查AGC平台的应用对应证书是否已过期:
【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?-鸿蒙开发者社区
2、可以重新自动签名或者更换证书,方法如下:
在File-Project Structure-Signing Configs下查看证书存储路径(Certpath file(*.cer))。
进入证书存储路径,将过期的证书删除(一般4个)。
【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?-鸿蒙开发者社区

3、本地调试时,在适用自动签名的场景,可以在Signing Configs页面勾选Automatically generate signature完成自动签名,其余需要手动签名的场景,需要去官网生成新的证书并更换证书。

官网链接:https://developer.huawei.com/consumer/cn/doc/architecture-guides/tools-v1_2-ts_267-0000002427231337

收藏
回复
举报
回复
    相关推荐