I get this error when I try to sign my .apk
jarsigner: unable to open jar file: android-release-unsigned.apk
I’ve no idea why this is happening. I’m using:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore android-release-unsigned.apk my-alias
My keystore is .keystore format, not .jks.
I’m sure I’m using the right passphrase, password and alias because I experimented using the wrong ones and I get appropriate errors.
I’m running this from within the /release folder so it’s not a path error.
Why won’t it sign?
4 Likes
Problem solved.
The docs need updating.
When you build a release the name of the file is app -release-unsigned.apk, NOT android-release-unsigned.apk
This really should be corrected in the docs!
12 Likes
devsm
January 19, 2018, 1:52pm
3
This didn’t solve the problem for me… I tried also running terminal as administrator but didn’t work…
1 Like
What error are you getting?
A also have this problem. When i changed to “app-release-unsigned.apk”, I got the error:
jarsigner: unable to open jar file: app-release-unsigned.apk
Did you find any different solution?
1 Like
So I just ran into this issue, but realized the apk file already has the .apk extension attached to it. So all you have to input is “app-release-unsigned”. Mine worked after I removed the extension. Hope this helps!
SubEffect:
app-release-unsigned.apk
None of these methods worked for me. Not sure what else to do.
You need to include the relative path to the apk
platforms/android/build/outputs/apk/android-release-unsigned.apk
18 Likes
This path worked for me…
platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
13 Likes
The path didn’t worked. But i copied the apk to parent folder. That worked!
11 Likes
Thank you so much it helped me a lot
1 Like
Thanks Passing the path worked for me
lokman
December 11, 2018, 3:02pm
18
Thanks bro! been trying to figure this out for the last 4 to 5 hours. Not sure when it was changed. Was building one one Sunday and it’s all good!
mah14
December 25, 2018, 9:47am
19
another way to do this is:
open project in android studio
go to “Build > Generate Signed APK”
go “Next”
click on “choose existing” button, then import your ****.keystore file
type pass and alias of your keystore file
go next and checked your “Signature version” and then finish
1 Like
Hi, im dont know which doc i should to change the name
Thanks that worked for me
Thanks. its working. Really need to update ionic document.