写点什么

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

作者:GeorgeGcs
  • 2025-09-01
    四川
  • 本文字数:510 字

    阅读完需:约 2 分钟

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

【 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

发布于: 刚刚阅读数: 4
用户头像

GeorgeGcs

关注

路漫漫其修远兮,吾将上下而求索。 2024-12-24 加入

鸿蒙创作先锋,华为HDE专家,鸿蒙讲师,作者。 目前任职鸿蒙应用架构师。历经腾讯,宝马,研究所,金融。 待过私企,外企,央企。 深耕大应用开发领域十年。 OpenHarmony,HarmonyOS,Flutter,H5,Android,IOS。

评论

发布
暂无评论
【 HarmonyOS 】错误描述:The certificate has expired! 鸿蒙证书过期如何解决?_GeorgeGcs_InfoQ写作社区