I am trying to build a signed apk for Android platform using cordova. I have already created unsigned apk using cordova --release android. But i am unable to sign usejarsigner and zipalign. kindly help.
I have already solved my problem. I am explaining its steps for the people who are still stuck in it:
Create a unsigned apk.
Run this command cordova --release android
after getting to the location of the project.
You can find the unsigned apk in project_name\platforms\android\build\outputs\apk\android-release-unsigned.apk
Copy this apk and keystore tool in one folder.
Navigate to the folder and sign it using jarsigner present in java.
Run this command,
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore <keystorename <Unsigned APK file> <Keystore Alias name>
After this you will be prompt to enter password of keystore.
Go to location of zipalign. (it is present in Android\SDK\build-tools\version)
Run this command
zipalign -v 4 "location of signed apk" "location of aligned apk"