Jul 3, 2011

compile problem because of an expired debug certificate

When I was compiling my Android app, I couldn't do it. I found this message in Problem view.
Error generating final archive: Debug certificate expired on XXX
I found same problem in android web site. According to the site, the Android build tools local debug key but it is already expired. To fix this problem, I had to regenerate my debug key.

Here is the step.
  1. delete the debug keystore/key already generated by the Android build tools. Specifically, delete the debug.keystore file. On Linux/Mac OSX, the file is stored in~/.android. On Windows XP, the file is stored in C:\Documents and Settings\<user>\.android. On Windows Vista, the file is stored in C:\Users\<user>\.android
  2. generate new debug keysore file with this command: keytool -genkey -v -keystore <PATH_TO_FILE>/debug.keystore -alias androiddebugkey -keyalg RSA -validity 10000 -dname "CN=Android Debug,O=Android,C=US"
Note: <PATH_TO_FILE> is a path to the debug keystore file. Please set appropriate path for your environment.

No comments:

Post a Comment