Android項目報錯誤信息Error generating final archive: Debug Certificate expired on 某個時間

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!

解決: 卸掉應用程序,重新裝。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章