Simple guide to create a signed apk from a Quasar app with Cordova.
- Quasar v1
- Cordova
- JDK
Install the latest cordova release
npm install -g cordova
Install cordova dependencies in your app
quasar mode add cordova
Change to cordova folder
cd src-cordova
Install Android platform
cordova platform add android
Go back to the root folder
cd..
Build your app
quasar build -m cordova -T android
Change to cordova folder again
cd src-cordova
Build the apk
cordova build android
Change to the apk release folder.
cd "<ROOT-FOLDER>\src-cordova\platforms\android\app\build\outputs\apk\release\"
To create a keystore, you have to run the command below, inform the password and answer all the questions.
JDK 1.8.0_171 is the version installed in my PC.
"C:\Program Files\Java\jdk1.8.0_171\bin\keytool.exe" -genkey -v -keystore MY_KEYSTORE.keystore -alias MY_KEYSTORE -keyalg RSA -keysize 2048 -validity 20000
Finally, run this command, inform the keystore password and the apk will be signed.
"C:\Program Files\Java\jdk1.8.0_171\bin\jarsigner.exe" -tsa http://timestamp.digicert.com -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore MY_KEYSTORE.keystore app-release-unsigned.apk MY_KEYSTORE
Your apk is ready to be installed in your device. Enjoy!