Expiry of the Debug Certificate

本文介绍了Android应用在使用自签名证书进行调试时遇到的证书过期问题及其解决办法。当证书过期后,开发者会收到构建错误提示。文章详细解释了如何通过删除debug.keystore文件来解决此问题,并说明了系统会在下次构建时自动生成新的证书。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

The self-signed certificate used to sign your application in debug mode (the default on Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.

When the certificate expires, you will get a build error. On Ant builds, the error looks like this:

debug:
[echo] Packaging bin/samples-debug.apk, and signing it with a debug key...
[exec] Debug Certificate expired on 8/4/08 3:43 PM

In Eclipse/ADT, you will see a similar error in the Android console.

To fix this problem, simply delete thedebug.keystorefile. The default storage location for AVDs is in~/.android/on OS X and Linux, inC:\Documents and Settings\<user>\.android\on Windows XP, and inC:\Users\<user>\.android\on Windows Vista and Windows 7.

The next time you build, the build tools will regenerate a new keystore and debug key.



转载自:http://developer.android.com/guide/publishing/app-signing.html

root@cvm-3m8si6a2da225:~# certbot renew Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/gaoerji.net.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cert not yet due for renewal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The following certs are not due for renewal yet: /etc/letsencrypt/live/gaoerji.net/fullchain.pem expires on 2025-09-03 (skipped) No renewals were attempted. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - root@cvm-3m8si6a2da225:~# sudo certbot certificates Saving debug log to /var/log/letsencrypt/letsencrypt.log Cannot extract OCSP URI from /etc/letsencrypt/live/gaoerji.net/cert.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Found the following certs: Certificate Name: gaoerji.net Domains: gaoerji.net Expiry Date: 2025-09-03 12:55:10+00:00 (VALID: 62 days) Certificate Path: /etc/letsencrypt/live/gaoerji.net/fullchain.pem Private Key Path: /etc/letsencrypt/live/gaoerji.net/privkey.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - root@cvm-3m8si6a2da225:~# sudo certbot renew --force-renewal Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/gaoerji.net.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Plugins selected: Authenticator nginx, Installer nginx Renewing an existing certificate nginx: [warn] conflicting server name "gaoerji.net" on 0.0.0.0:80, ignored nginx: [warn] conflicting server name "gaoerji.net" on 0.0.0.0:443, ignored - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - new certificate deployed with reload of nginx server; fullchain is /etc/letsencrypt/live/gaoerji.net/fullchain.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations, all renewals succeeded. The following certs have been renewed: /etc/letsencrypt/live/gaoerji.net/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - root@cvm-3m8si6a2da225:~#
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值