- Build the application in debug mode
- Go inside the folder : "platforms/android/assests/www/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/"
- And delete all the files
- Open Cmd prompt in administrator mode
- Go inside folder : "platforms/android/cordova"
- Type : "build --release" and press enter.
- Now check the path of keytool.exe in your PC : C:\Program Files\Java\jre1.8.0_45\bin
- Using command prompt go inside the folder and type the following command
- Generate a private key using
keytool
. For example:$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
- Change the red highlighted text as per requirement.
- Press enter and fill the asked information. Please do remember the alias name and password asked during the processing
- Now check the path of jarsigner.exe in your PC: C:\Program Files\Java\jdk1.8.0_45\bin
- Sign your app with your private key using
jarsigner
:$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
Verify that your APK is signed. For example:$ jarsigner -verify -verbose -certs my _application.apk
- Now check for the path zipalign.exe in Your PC: C:\Program Files (x86)\Android\android-sdk\build-tools\22.0.1
Align the final APK package usingzipalign
.
$ zipalign -v 4 your_project_name-unal ig ned.apk your_project_name.apk
Comments
Post a Comment
Thanks for your Comment