6

I recently updated an app to the market, I generated the keystore and the corresponding password. Now I updated the app and intend to update it on the market too, I have published QR Codes for the same in media and whilst I try to sign my new APK I keep on getting the error " Invalid keystore format" for the option of "Use existing Keystore". Unable to determine where I am going wrong.

Here is the screenshot:

jcw
  • 5,132
  • 7
  • 45
  • 54
Skynet
  • 7,820
  • 5
  • 44
  • 80

6 Answers6

3

You definitely need to create a new keystore file.
But you need to add some properties while creating the keystore file.

keytool -genkey -v -keystore C:/Users/Username/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key
Aditya
  • 330
  • 1
  • 7
1

Are you positive that you are opening the same keystore as before and using the right password? There may be a possibility that the keystore somehow got corrupted; perhaps you have a backup?

Oleg Vaskevich
  • 12,444
  • 6
  • 63
  • 80
  • 1
    I am new to this, the previous keystore I generated had the same password I am using right now. Where is the keystore located? I can find my exact apk at F:\. That is where I stored it. – Skynet Jan 05 '13 at 08:32
  • You are exporting a signed application, right? The keystore is just a file that ADT can help you create; I don't know where you stored it. You can read about it [here](http://stackoverflow.com/questions/6849558/android-what-is-a-keystore-file-and-what-is-it-used-for) and [(more importantly) here](http://developer.android.com/tools/publishing/app-signing.html). – Oleg Vaskevich Jan 05 '13 at 08:38
  • I found it, I had not provided the path to it while creating it. Eclipse had hidden it inside its default folder. But my problem seems to persis. As previously I had created a keystore and due to the same problem had to sign my new app with a different keystore. Now I am able to find the previous one but not the new one! Pretty confusing! – Skynet Jan 05 '13 at 08:42
  • 1
    It could be the `.android/debug.keystore` file; you should search for all `.keystore` files (default password is `android` I believe). – Oleg Vaskevich Jan 05 '13 at 08:45
0

I used unity to export the game to android studio. I had the same problem where it said invalid key format. I exported the project from unity once again to a different folder and used android studio to build it and generate a signed bundle. That solved the problem for me

0

The easiest way to sort this out is to go close your Android Studio then go to your Users Directory and Delete the .android Folder and Launch your Android Studio Again(Make sure you have an Internet connection, so that it can build properly)

0

simple solution: UPGRADE PLUGIN

-1

(For already existing KeyStore) Put your .jks file in your workspace and then right click on project > export >Android >Export Android Application >cilck on browser (select your project) >next >click on browser (give path of your .jks file from workspace where you placed it) >password >alias (select your alias from drop down) >password >finish

LisaMM
  • 675
  • 1
  • 16
  • 28