Skip to main content

"Debug certificate expired' error in Eclipse Android plugins


I am using Eclipse Android plugins to build a project, but I am getting this error in the console window:




[2010-02-03 10:31:14 - androidVNC]Error generating final archive:



Debug certificate expired on 1/30/10 2:35 PM!




How do I fix it?


Source: Tips4allCCNA FINAL EXAM

Comments

  1. Delete your debug certificate under ~/.android/debug.keystore on Linux and Mac OS X; the directory is something like %USERPROFILE%/.androidon Windows.

    The Eclipse plugin should then generate a new certificate when you next try to build a debug package. You may need to clean and then build to generate the certificate.

    ReplyDelete
  2. Upon installation, the Android SDK generates a "debug" signing certificate for you in a keystore called debug.keystore. The Eclipse plug-in uses this certificate to sign each application build that is generated.

    Unfortunately a debug certificate is only valid for 365 days. To generate a new one you must delete the existing debug.keystore file. Its location is platform dependent - you can find it in Preferences - Android - Build - Default debug keystore.

    ReplyDelete
  3. It's a pain to have to delete all your development .apk files, because the new certificate doesn't match so you can't upgrade them in all your AVDs. You have to get another development MAP-API key as well. There's another solution.

    You can create your own debug certificate in debug.keystore with whatever expiration you want. Do this in the .android folder under your HOME directory:

    keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000

    ADT sets the first and last name on the certificate as "Android Debug", the organizational unit as "Android" and the two-letter country code as "US". You can leave the organization, city, and state values as "Unknown". This example uses a validity of 14000 days. You can use whatever value you like.

    ReplyDelete
  4. On Vista, this worked:


    DOS: del c:\user\dad\.android\debug.keystore
    ECLIPSE: In Project, Clean the project. Close Eclipse. Re-open Eclipse.
    ECLIPSE: Start the Emulator. Remove the Application from the emulator.


    You are good to go.

    I was pretty worried when I say that error, but I fixed it from reading here and playing around for 10 minutes.

    ReplyDelete
  5. WINDOWS


    Delete: debug.keystore
    located in
    C:\Documents and Settings\[user].android

    Restart Eclipse and automatically you will have another keystore


    MAC


    Delete your keystore located in ~/.android/debug.keystore then restart Eclipse.

    ReplyDelete
  6. In Windows 7 it is at the path

    C:\Users\[username]\.android



    goto this path and remove debug.keystore
    clean and build your project.

    ReplyDelete
  7. If certificate expires in the middle of project debugging you must do manual uninstall:

    Please execute 'adb uninstall <package_name>' in a shell.

    ReplyDelete
  8. On Ubuntu, this worked:

    I went to home/username/.android and I renamed keystore.debug to keystoreold.debug. I then closed Eclipse, started Eclipse, and SDK created new certificate keystore.debug in that folder.

    You then have to uninstall/reinstall apps you installed via USB Debugging or an unsigned APK ("unsigned" APK = signed with debug certificate).

    ReplyDelete
  9. I had this problem couple of weeks ago. I first tried the troubleshooting on the Android developer site, but without luck. After that I reinstalled the Android SDK, which solved my problem.

    ReplyDelete
  10. On a Mac, open the console (current user's directory should open), cd ".android" ("ls" to validate debug.keystore is there). Finally "rm debug.keystore" to remove the file.

    ReplyDelete
  11. H-m-m-m. Interesting how so many people have had slightly different experiences with this. I remember the days when this was considered a sign that the software was not ready for release, and the team would actually fix it BEFORE users started seeing these problems:(

    My own experience was just a little different. I had already tried Project>Clean, but still got the same build failure. Then I deleted the debug.keystore (under .android) just as the first answer said. Still got the same problem. Then I did a clean again, and wonder of wonders, it worked!

    Now don't get me wrong, I am glad that I got it working thanks to the hints in this thread. But clearly clean isn't working right, and how did it find an expired key after I deleted the keystore??? Clearly something is wrong with Eclipse or the ADT -- not so sure which.

    ReplyDelete
  12. The Android SDK generates a "debug" signing certificate for you in a keystore called debug.keystore.The Eclipse plug-in uses this certificate to sign each application build that is generated.

    Unfortunately a debug certificate is only valid for 365 days. To generate a new one, you must delete the existing debug.keystore file. Its location is platform dependent - you can find it in Preferences -> Android -> Build -> *Default debug keystore.

    If you are using Windows, follow the steps below.

    DOS: del c:\user\dad.android\debug.keystore

    Eclipse: In Project, Clean the project. Close Eclipse. Re-open Eclipse.

    Eclipse: Start the Emulator. Remove the Application from the emulator.

    If you are using Linux or Mac, follow the steps below.

    Manually delete debug.keystore from the .android folder.

    You can find the .android folder like this: home/username/.android

    Note: the default .android file will be hidden.

    So click on the places menu. Under select home folder. Under click on view, under click show hidden files and then the .android folder will be visible.

    Delete debug.keystore from the .android folder.

    Then clean your project. Now Android will generate a new .android folder file.

    Click for Original Click For Full Solution.

    ReplyDelete
  13. 1) It would be nice to be warned this fun is coming when I start a project.

    2) Thanks to Mortensen and Kumar for the link 'Click For Full Solution'. The first suggestion there worked. And I'd tried editing the start/end dates in the keystore file using UltraEdit. Nothin.

    3) AND finally, can some old hand at the Eclipse IDE (or is the an Android issue) please tell me what purpose having your project unable to be rebuilt if you come back to it 366 days later possibly serves?

    ReplyDelete
  14. Delete following file and clean build in Eclipse:

    Linux and Mac OS X
    ~/.android/debug.keystore on
    Windows:
    %USERPROFILE%/.android

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex