“Debug certificate expired” error in Eclipse Android plugins

前端 未结 17 1923
清歌不尽
清歌不尽 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.

提交回复
热议问题