I am trying to do a production build of an apk but when I try to sign it with the following command:
apksigner.bat sign --ks app-release-key.jks --out app-release-unsigned.apk app-release-unsigned-aligned.apk
I get the below error:
Unexpected parameter(s) after input APK (--out)
I am following this to sign the app manually from the command line.
I'm using the apksigner .bat file located at ../Android/Sdk/build-tools/32.0.0
and as you can see I'm using Android build tools 32.0.0. I've tried different things
- Using jarsigner to sign the app, and although it successfully signed the app, my app would not load when I installed it onto the device. Also, according to this we should use apksigner if we're using build-tools 24.0.3 and older.
- Tried to use this as well
apksigner.bat sign --ks test.jks --ks-key-alias test --ks-pass pass:testtest --key-pass pass:testtest Test_Aligned.apk
from here but it gave me the errorUnexpected parameter(s) after input APK (--ks-key-alias)
- Tried using the jar apksigner located at
../Android/Sdk/build-tools/32.0.0/bin
but I'm receiving the same error.
Any suggestions would help. Thanks.