9

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!

1
  • 3
    paste the image into stack overflow, don't host on another site please Commented May 17, 2011 at 23:21

8 Answers 8

11

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.

Sign up to request clarification or add additional context in comments.

1 Comment

worked for me.. i opened (in mac).. /Users/myusername/ and deleted .android. .. and it started working smoothly.
8

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

9 Comments

-storepasswd -v -new <new_storepass> -keystore <keystore full path> -storepass <storepass> this should be run from the bin folder of your installed java distribution
This should be found in the bin folder of each of my application?
usually the default path is C:\Users\YOUR_USER\.android\debug.keystore (this is on win7)
Hold on for sec I'm going to try it
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>
|
5

This solution is worked for me.

Delete "debug.keystore" file from ".android" folder and restart Android studio, studio will create a new file.

Go inside the ".android" folder and run rm debug.keystore.

Comments

4

It is due to different use of java versions

Like I have installed jdk_1.8 at D:\Program Files\Java\

And for android studio, It was using D:\Program Files\Android\Android Studio\jre

When I just used keytool I got error as invalid keytool format

but when I changed this cmd like below it worked for me!

"D:\Program Files\Android\Android Studio\jre\bin\keytool" -list -v -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android 

1 Comment

This looks right for my situation. My openJDK keytool.exe was major version 8, but the one in android studio was 11
2

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.

2 Comments

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
Is it my imagination, or did this question get mangled with another one?
1

I had the same issue as Shubham Jumar Gupta with JVM version mismatches.

The keystore that Android Studio generated was presumably generated with the in-app JDK 11.

The keytool.exe available on my PATH and my JAVA_HOME was JDK 8 (verified with trying to run it from cmd)

Eventually after a lot of messing around, I had to update Gradle's Java Home path buried in File->Settings->Build, Execution, Deployment->Build Tools->Gradle. Then I have to change the "Gradle JDK" to point to a newer version of the JDK. In my case, JDK 11 matched what came in Android Studio's built-in JRE and then I was able to build my release APK.

Comments

0

Go to the folder, delete debug.keystore and restart Eclipse.

C:\Users\INTEL\.android 

1 Comment

instead of INTEL use your own user account.
0

Am using below version, i just did clean then build for the project and worked.

clean project

build project

android studio version

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.