Android项目报错误信息Error generating final archive: Debug Certificate expired on 某个时间

来源:互联网 发布:喜欢英国的理由 知乎 编辑:程序博客网 时间:2024/05/17 23:15

Error generating final archive: Debug Certificate expired on 12-3-1 上午10:51 的错误 

转载自:http://www.cnblogs.com/wisekingokok/archive/2011/09/08/2171335.html

问题概述:

在导入一个app后提示如下错误:

“Error generating final archive: Debug Certificate expired on 12-3-1 上午10:51 ”

原因分析:

android 要求所有的程序必须有签名,否则就不会安装该程序。在我们开发过程中,adt使用debug keystore,在 preference->android->buid中设置。debug的keystore默认有效期为一年,如果你是从一年前开始完 android程序,那么在一年后导入这个app的时候很可能出现debug keystore过期,导致你无法生成 apk文件。

此时你只要删除debug keystore就行,系统又会为你生成有效期为一年的私钥。

解决方法:

将debug.keystore删除即可!

进入C:\Documents and Settings\Administrator\.android 删除路径下的debug.keystore及 ddms.cfg。

(不同环境下的目录可能略有不同,可在eclipse中查找此路径:Window->Preferences->Android->Build下 Default debug keystore)

然后重新导入即可。

模拟器上再次运行,出现错误:

[2012-03-01 11:05:50 - hello] Re-installation failed due to different application signatures.
[2012-03-01 11:05:50 - hello] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-03-01 11:05:50 - hello] Please execute 'adb uninstall com.test.zhangmm' in a shell.
[2012-03-01 11:05:50 - hello] Launch canceled!
[2012-03-01 11:05:51 - hello] Re-installation failed due to different application signatures.
[2012-03-01 11:05:51 - hello] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-03-01 11:05:51 - hello] Please execute 'adb uninstall com.test.zhangmm' in a shell.
[2012-03-01 11:05:51 - hello] Launch canceled!

解决: 卸掉应用程序,重新装。


原创粉丝点击