天天看點

“Error generating final archive: Debug Certificate expired on 11/11/22 16:30”

原因分析:

android要求所有的程式必須有簽名,否則就不會安裝該程式。在我們開發過程中,adt使用debug keystore,在 preference->android->buid中設定。debug的keystore預設有效期為一年,如果你是從一年前開始完android程式,那麼在一年後導入這個app的時候很可能出現debug keystore過期,導緻你無法生成 apk檔案。

此時你隻要删除debug keystore就行,系統又會為你生成有效期為一年的私鑰。 

解決方法:

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

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

然後重新運作APP即可!