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
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.
Delete your debug certificate under ~/.android/debug.keystore
on Linux and Mac OS X; the directory is something like %USERPROFILE%/.android
on 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.
Delete: debug.keystore
located in
C:\Documents and Settings\\[user]\.android
, Clean and build your project.
C:\Users\[username]\.android
and delete debug.keystore file.Clean and build your project.
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.
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)
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.
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.
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.
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).