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

2025-09-01 21:22:28
115次阅读
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.

在这里插入图片描述

二、解决方案:

1、首先检查AGC平台的应用对应证书是否已过期: 在这里插入图片描述 2、可以重新自动签名或者更换证书,方法如下: 在File-Project Structure-Signing Configs下查看证书存储路径(Certpath file(*.cer))。 进入证书存储路径,将过期的证书删除(一般4个)。 在这里插入图片描述

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

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

收藏00

登录 后评论。没有帐号? 注册 一个。