解决Debug certificate expired的问题 - 转

简介: 使用Eclipse调试Android程序,源代码没有错,但总是提示:Error generating final archive: Debug certificate expired on **** 从字面了解,是由于Debug证书过期所致。

使用Eclipse调试Android程序,源代码没有错,但总是提示:
Error generating final archive: Debug certificate expired on ****

从字面了解,是由于Debug证书过期所致。

Android的应用程序必须经过开发者自己的自签名证书进行数字签名之后,才能安装到Android系统上。在开发调试阶段,默认情况下,ADT辅助工具帮我们对apk文件进行了签名,采用的是默认的Debug版本的签名文件。

安装之后,Android SDK会生成一个Debug签名证书,保存在debug.keystore文件中。ADT使用这个证书对每个生成的应用(Application)进行数 字签名。非常不幸的是,每个Debug证书的有效期限是365天,那么不可避免的就会有证书过期的问题了。而Android SDK又比较呆板,发现证书过期了,不会给你换新的,只会给你Error提示。
Windows系统下,这个Debug证书保存在C:\Documents and Settings\Administrator\.android目录下。查看了一下,发现这个证书的修改日期是2009年11月9日,差不多是一年前 了,刚好有段时间没有使用Android SDK,这次使用即爆发这个问题了。
解决的办法比较简单:将debug.keystore直接删除。Android SDK发现debug.keystore丢失了,就会自个生成一个新的。再运行SDK,一切正常了。

目录
相关文章
|
2月前
|
JavaScript
request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
54 2
Get “https://npm.taobao.org/mirrors/node/latest/SHASUMS256.txt“: tls: failed to verify certificate:
Get “https://npm.taobao.org/mirrors/node/latest/SHASUMS256.txt“: tls: failed to verify certificate:
|
安全 网络安全 PHP
解决SSL routines:ssl3_get_server_certificate:certificate verify failed
解决SSL routines:ssl3_get_server_certificate:certificate verify failed
576 0
|
网络安全
ssl.SSLError [SSL CERTIFICATE_VERIFY_FAILED] certificate verify failed
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
218 0
|
网络安全
unable to verify the first certificate
unable to verify the first certificate
672 0
|
TensorFlow 网络安全 算法框架/工具
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
最近在学习TensorFlow,获取fashion_mnist数据集的时候出现了一点小问题,报错内容如下: URL fetch failure on https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108) ————————————————
1183 0
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
|
网络安全
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
164 0
|
网络安全
curl error: SSL certificate problem: unable to get local issuer certificate解决方案
curl error: SSL certificate problem: unable to get local issuer certificate解决方案
393 0
|
网络安全 Apache 数据安全/隐私保护
Apache错误日志提示AH02004: SSL Proxy: Peer certificate is expired
Apache错误日志提示AH02004: SSL Proxy: Peer certificate is expired
206 0
Apache错误日志提示AH02004: SSL Proxy: Peer certificate is expired