Thursday, February 23, 2012

Debug Certificate Expired

When you are building your android applications you don't really want to have to worry about signing your app before you install it on a device just for testing purposes.

Thankfully, the Android Development Tools will take care of this for us, and when you run your application from Eclipse, the Android plug in will automatically take care of signing the app with a debug certificate.

However, if you have been developing Android apps for more than a year, you may have run into the following problem.

Error generating final archive: Debug Certificate expired on...

This may seem like a complicated error message at first, especially if you were unaware that you had been signing all of your Android apps with a debug certificate in the first place.

Example of the debug certificate expired error in Eclipse

But have no fear! It is a simple problem to fix. Eclipse may not know how to handle an expired certificate, but it knows how to handle a missing debug certificate.

Go to Window->Preferences->Android->Build to find the location of the current Android Debug Certificate. Find this location and delete the file.

The Android Build options menu

Now go the project menu, and select clean. Clean all of your projects, and then they should build without any problems.

Now your projects should build without any problems. The debug certificate is generally good for a year, so you shouldn't run into this problem too often.

For more information about app signing, you can see the official android documentation

No comments:

Post a Comment