2

i'm trying to prepare my app for publishing to play store, bur while i'm creating the app bundle, this error shows up too many times, i was recreate the keystore but it's failed again, i want to mention that when i setup keystore it's asks me for keystore password just without keypass

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[        ]    
> Failed to read key key from store "/Users/ahd/key.jks": Invalid keystore format
AhdOthman
  • 47
  • 4

1 Answers1

3

I had this issue and it was because of the version of Java I was using. I used the keytool within Android Studio to generate the keystore instead and this fixed the issue for me.

Run flutter doctor -v and look for the "Java binary at:" entry. Then use this path swapping 'java' for 'keytool' to generate your keystore. For example

/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

In my case I also followed the recommendation that popped up at the end of this to migrate to PKCS12 (once again using the keytool in Android Studio).

Philip Bennison
  • 519
  • 2
  • 10