歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 下用 Eclipse 新建工程且編譯出錯誤

Ubuntu 下用 Eclipse 新建工程且編譯出錯誤

日期:2017/2/28 15:57:38   编辑:Linux教程

Ubuntu 下用 Eclipse 新建工程且編譯,出現如下錯誤提示:
[2011-12-11 11:23:06 - MyOpenGLES] Error generating final archive: Debug certificate expired on 11-2-05 上午10:56!

原因分析:
Android 要求所有的程序必須有簽名,否則就不會安裝該程序。

在開發過程中,ADT 使用 debug.keystore ,
在 Eclipse 菜單 [Window] -> [Preferences] -> [Android] -> [Build] -> "Default debug keystore"
中顯示的路徑下的這個文件 debug.keystore 過期了。

debug.keystore 默認有效期為一年,如果你是從一年前開始開發 android 程序,
那麼在一年後出現 debug.keystore 過期,導致你無法生成 apk 文件。

解決方法:
只要刪除 debug.keystore 和 ddms.cfg 就可以了,系統又會為你生成有效期為一年的 debug.keystore ,
然後 Eclipse 菜單 [Project] -> [clean] 清除一下工程,然後重新編譯即可。

創建自定義 keystore :
[File] -> [Export...] -> "Androd" 下的 "Export android application" ->
"Select the project to export" -> "Keystore selection" 中選擇 "Create new keystore" 之後按提示添寫即可!

Copyright © Linux教程網 All Rights Reserved