“Debug certificate expired” error in Eclipse Android plugins

前端 未结 17 1648
清歌不尽
清歌不尽 2020-11-22 07:39

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          


        
相关标签:
17条回答
  • 2020-11-22 07:51

    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
    

    keytool.exe can be found in the JDK bin folder (e.g. C:\Program Files\Java\jdk1.6.0_31\bin\ on Windows).

    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.

    0 讨论(0)
  • 2020-11-22 07:52

    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.

    0 讨论(0)
  • 2020-11-22 07:56
    • WINDOWS

    Delete: debug.keystore located in C:\Documents and Settings\\[user]\.android, Clean and build your project.

    • Windows 7 go to C:\Users\[username]\.android and delete debug.keystore file.

    Clean and build your project.

    • MAC

    Delete your keystore located in ~/.android/debug.keystore Clean and build your project.

    In all the options if you can´t get the new debug.keystore just restart eclipse.

    0 讨论(0)
  • 2020-11-22 07:57

    In Windows debug.keystore file is localtes at C:\Users\%Username%\.android folder. This file is created when you install your android SDK and is valid only for a year. After this perod you will start getting this error Error getting final archive: Debug certificate expired on xx/xx/xxxx.

    To remove this error simply delete the file and run the program again. In my Eclipse I have enabled Project->Build Automatically so it directly worked but in case you have disabled it you will need to clean the project Project->Clean.. select your project and press ok. Then you will need to build it manually. 3rd click on your project and select Build project.(Note - You will only see this option if you have diabled Build Automatically feature in your Projects Menu)

    0 讨论(0)
  • 2020-11-22 07:59

    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.

    0 讨论(0)
  • 2020-11-22 08:00

    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).

    0 讨论(0)
提交回复
热议问题