Invalid Keystore problem?

30,848

Solution 1

I had the same problem a while ago, when I changed the pass for the default.keystore

Check if the keystore that you are using as "debug.keystore" has the same pass as the default one. The following are the default:

Keystore name: "debug.keystore" Keystore password: "android" Key alias: "androiddebugkey" Key password: "android"

Android app signing

Solution 2

Delete .android folder in your work space then try with step by step process.

Also, be careful while creating key stores and passwords and alias.

Solution 3

Try deleting your trusted.certs file.

If the keystore has actually been corrupted, you won't be able to regenerate the same one and update your app... this is why it's very, very important to back up your keystore.

If the error pops up when you're importing a project rather than keysigning your app, though, I suspect it's a problem with Eclipse or your Java setup... not a problem with the keystore you created.

Share:
30,848
user739375
Author by

user739375

Updated on February 03, 2022

Comments

  • user739375
    user739375 over 2 years

    Recently I published my new app, and this morning I decided to make a little changes to this app. However, every time I import any of my app folders on Eclipse, this error always showing up "Error generating final archive java.io.IOException: Invalid keystore format", even when I create a new Android file, this error keep showing up. Please, help me! I have created several apps and I don't want to create a new keystore.

    Here is the Image of the error!

    http://www.fileden.com/files/2006/5/5/14780/error.png

    I already tried to clean the folder and restart but it didn't work.

    Please help me, I would really appreciate it a lot thanks!

  • Ciprian Radu
    Ciprian Radu about 13 years
    -storepasswd -v -new <new_storepass> -keystore <keystore full path> -storepass <storepass> this should be run from the bin folder of your installed java distribution
  • user739375
    user739375 about 13 years
    This should be found in the bin folder of each of my application?
  • Ciprian Radu
    Ciprian Radu about 13 years
    usually the default path is C:\Users\YOUR_USER\.android\debug.keystore (this is on win7)
  • user739375
    user739375 about 13 years
    Hold on for sec I'm going to try it
  • Ciprian Radu
    Ciprian Radu about 13 years
    no ... the keytool.exe is found in the bin folder of the jre or jdk distribution
  • user739375
    user739375 about 13 years
    You mean in ".android" folder?
  • Ciprian Radu
    Ciprian Radu about 13 years
    try running this in the cmd window "C:\Program Files\Java\jre6\bin\"keytool.exe -storepasswd -v -new <new_storepass> -keystore <keystore full path> -storepass <current storepass>
  • user739375
    user739375 about 13 years
    When I clicked the keytool.exe, the command Prompt shows up, but it dissapeared too quick
  • Turnsole
    Turnsole about 13 years
    It looks from your screenshot that you're on Windows 7, so try around here (but with your username): <user>\application data\sun\java\deployment\security
  • Turnsole
    Turnsole about 13 years
    Is it my imagination, or did this question get mangled with another one?
  • MSpeed
    MSpeed over 12 years
    @user739375 Go to the directory it's in from the command line and run keytool.exe from there. (I know this was ages ago, just posting for anyone else reading)
  • Shraddha
    Shraddha about 12 years
    Thanks Ciprian, you saved me.
  • MFarooqi
    MFarooqi almost 3 years
    worked for me.. i opened (in mac).. /Users/myusername/ and deleted .android. .. and it started working smoothly.
  • MFarooqi
    MFarooqi almost 3 years
    instead of INTEL use your own user account.