Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
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!
–
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
–
–
–
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.
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.
–
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
–
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.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.