2
C:\Program Files\Java\jdk1.7.0_01\bin> jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore Cartoons.keystore Cartoons.apk Cartoons

When I run this command I get this error: Only one alias can be specified

Andreea
  • 151
  • 1
  • 3
  • 12
  • 1
    possible duplicate of [jarsigner "Only one alias can be specified"](http://stackoverflow.com/questions/8748089/jarsigner-only-one-alias-can-be-specified) – user207421 Aug 25 '15 at 23:15

1 Answers1

1

One way is to rename your path to remove the spaces, so:

C:\a folder with spaces\ should be replaced with C:\a_folder_with_spaces\

Or in your case

C:\Program_Files\Java\jdk1.7.0_01\bin

As pointed out in the comments, the alternative is to specify a full path to the keystore and the apk file, and put quotes around them: ( Although I don't claim to have tested this.. Presumably EJP, who pointed this out, has )

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore "C:/Program Files/..../Cartoons.keystore" "C:/Program Files/...../Cartoons.apk" "C:/Program Files/..../Cartoons"

I prefer the solution where you just use a folder without spaces if you are going to be doing this often, as those arguments are quite a mouthfull, but for just one or two times, the above is probably easier.

jcw
  • 5,132
  • 7
  • 45
  • 54