Android: Debug certificate expired on date Solution

Source: Internet
Author: User

 

Error: Error generating final archive: Debug
Certificate Expired on xxxxxx (date)

Solution:
Go to C:/Documents and Settings/user (User Account)/. Android
, Delete: Debug. keystore and ddms. cfgenglish blog

Once in a while the SDK shows some hickups-usually easy to solve. As this one. Today I got this error message"Error generating final archive: Debug certificate expired on
..." While building an APK file inside eclipse to be run in the emulator on a machine which has not been used for a while.

If you are using intellij 9 with the android plugin the error message looks like this:

Well, the idea to just update all components to the Current State and
Then to compile a project to check it out on this backup Development
System went from a 10 min cruise to the unexpected question "whats
Wrong ?".

Looking at the error message it was clear that the Build Process
Wanted to use a certificate which timed out. The Android SDK is using
Certificates to sign all the APK files even ther files which run in
Emulator (Fair enough). The CERT is usually valid for just 365 days
Which means that you get the same error next time shortly after
Forgetting how you 'd solve it last time.

The simple solution is to just delete the file"Debug. keystore
"Which is stored in your home directory under"~ /. Android
"(OSX, Linux). A Windows Vista/7 user will find the file in the" C:/users/<user </. Android folder.

After deleting the file just "clean" your project and build int from scratch and the error shocould be gone.

To prevent this brain training procedure for a while a decided
Generate a key which lasts 1000 days instead of just the full year.
Startup The OSX terminal app or the Linux terminal and go to
". Android" folder. Delete the old certificate file first. Then issue
Following command from the command line:

Keytool-genkey-keypass Android-keystore Debug. keystore-alias
Androiddebugkey-storepass Android-validity 1000-dname "CN = android
Debug, O = Android, c = us"

Now there shoshould be a new certificate file sitting in the folder
Which lastss 1000 days-enough to really forget how you solved this
Issue last tim

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.