2012年4月10日火曜日

Error generating final archive: Debug Certificate expired

Error generating final archive: Debug Certificate expired

副題:Your project contains error(s), please fix them before running your application.

このエラーが発生する根拠は、Signing Your ApplicationsのExpiry of the Debug Certificateに書かれています。

The self-signed certificate used to sign your application in debug mode (the default on Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.
デバッグモードにおける署名証明書は、その作成日から365日の有効期限があります

解決方法もそこに書かれています。

To fix this problem, simply delete the debug.keystore file. The default storage location for AVDs is in ~/.android/ on OS X and Linux, in C:\Documents and Settings\<user>\.android\ on Windows XP, and in C:\Users\<user>\.android\ on Windows Vista and Windows 7.
The next time you build, the build tools will regenerate a new keystore and debug key.
この問題を解決するには、単にdebug.keystoreファイルを削除すれば良いです。 このファイルの保存場所は開発環境毎に異なります。次のとおりです。
OS XおよびLinuxの場合: ~/.android/
Windows XPの場合: C:\Documents and Settings\<user>\.android\
Windows Vista and Windows 7の場合: C:\Users\<user>\.android\

このファイルを削除した後、「Clean...」を実行し、更に「Debug」を実行すると、debug.keystoreファイルが自動的に生成され、エラーが発生しなくなります。
Eclipseの再起動の必要はありません。

上記措置を講じて、デバッグを実行しようとすると次のエラーが出るかもしれません。

Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb uninstall jp.Androyer.JPV' in a shell.
Launch canceled!
このエラーに対処するため、デバッグを実行する前に、開発用端末上の、又はエミュレータ上の、開発中のアプリをアンインストールしておく必要があります。


毎年1回、上記の作業を行うことになります。
この記事をお読みになった皆様、1年後に、また、この記事でお会いしましょう。

0 件のコメント:

コメントを投稿