Reputation: 11
When i signed the application file,i got an error as jar signer: unable to open the jar file..Please help me to sort out this
problem as I am new to android development.
C:\Users\user>keytool -genkey -v -keystore my-release-key.keystore -alias alias_
name -keyalg RSA -keysize 2048 -validity 20000
Enter keystore password: Re-enter new password: What is your first and last name? What is the name of your organizational unit? What is the name of your organization? What is the name of your City or Locality? What is the name of your State or Province? What is the two-letter country code for this unit?
Upvotes: 1
Views: 24034
Reputation: 101
This post is old, but just to help other who will end up here with the same question. I solved it when I copied the generated keystore to the apk dir and ran the jarsigner in a console set to the apk path.
Upvotes: 7
Reputation: 7082
Use this command on command prompt when put the keystore file and apk file both in same folder and reach that folder and enter this command and it asking for password enter same password when created the keystore file
for genrating the keystore and after that create the keystore file inside the user folder
keytool -genkey -v -keystore appname.keystore -alias appname -keyalg RSA -keysize 2048 -validity 10000
and reach this folder use this one
jarsigner -keystore appname.keystore apkname.apk appname
Upvotes: 3
Reputation: 101
Might be a corrupt jar.
To rule that out add a .zip extension to the end of the file to see if you can then unzip that file. If you can't then thats your problem. If it unzips, then its something else.
Upvotes: 0