Android中解決debug.keystore到期的問題

來源:互聯網
上載者:User

分享:

開發Android或者jee或者其他java應用時,如果eclipse中的項目前有個紅叉叉,但是src下有沒有任何提示錯誤但是又不能通過編譯的時候如何找到項目工程的錯誤根源呢?方法如下:

開啟eclipse的problem視圖(如果關閉了可以在window->show view下找到problem視圖),然後在視圖中就可以看到項目的根源問題何在了,呵呵。

言歸正傳,回到我遇到的問題上。

問題描述:

在匯入一個Android App後提示如下錯誤:

Description Resource Path LocationType

Error generating final archive: Debug Certificate expired on 8/18/11 9:30 PMxxxxxx(這個是我的項目名稱)UnknownAndroid Packaging Problem

 

原因分析:

android要求所有的程式必須有簽名,否則就不會安裝該程式。在我們開發過程中,adt使用debug keystore,在eclipse中的preference->android->buid中設定。debug的keystore預設有效期間為一年,如果你是從一年前開始著手android開發的,那麼在一年後很可能出現debug
keystore到期,導致工程出錯(比如我的情況)或者無法產生 apk檔案等等(由於我的eclipse和sdk/adb等重新安裝折騰過好多次了,一直沒遇到這個問題,今天運氣好碰上了,呵呵)。

 

解決方案: 

只要刪除debug keystore和ddms.cfg檔案即可,系統會為你重建有效期間為一年的私密金鑰。 debug keystore和ddms.cfg檔案地址位於:

1)linux(Mac OS):

在eclipse中的Window->Preferences->Android->Build中Default debug keystore查看keystore的地址:

“/home/使用者名稱/.android/debug.keystore”

刪除此路徑下的debug.keystore及 ddms.cfg

2)Windows:

進入:C:\Documents and Settings\使用者名稱\.android 刪除:debug.keystore及 ddms.cfg

進入:C:\Documents and Settings\Administrator\.android刪除:debug.keystore及 ddms.cfg


(注意:即使是Windows下也應該在eclipse中的Window->Preferences->Android->Build中Default debug keystore查看keystore的地址位置,否則會出現找不到檔案的情況)

 

註明:QQ技術交流群:108614806   感興趣的加一下。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.