Robby
Robby

Reputation: 71

Jarigner: unable to open jar file

I have searched a lot about this issue and everything I've found didn't seem to help. I am trying to sign my cordova app in android with the following command:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore key_file_name.keystore my_application.apk alias_name

I have specified the directory of the apk, while the keystore is in it's default directory.. I have also tried placing the apk files in a same folder with the keystore file but I got the same error.

Please help!

Upvotes: 2

Views: 2574

Answers (2)

M.Hajavi
M.Hajavi

Reputation: 277

another way to do this is:

  1. open project in android studio
  2. go to “Build > Generate Signed APK”
  3. go next page
  4. click on “choose existing” button, then import your ****.keystore file
  5. type "password" and "alias" of your keystore file
  6. go next page and select your “Signature version” method, then click on finish button

Upvotes: 0

Bharathkumar V
Bharathkumar V

Reputation: 357

My 2 cents, if you are using windows, try from command prompt and not from bash or any other tool. It fixed for me.

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore D:\motivation-pyramid\platforms\android\build\outputs\apk\android-armv7-release-unsigned.apk alias_name

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore D:\motivation-pyramid\platforms\android\build\outputs\apk\android-x86-release-unsigned.apk alias_name

Upvotes: 1

Related Questions