Skip to content

How to Package cordova app

Just a simple step by step reference for packaging a cordova app:

  1. CD to the directory containing your app in the console
  2. export PATH=$PATH:”/cygdrive/P/Programs/Android/SDK/tools”
    export PATH=$PATH:”/cygdrive/P/Programs/Java/jdk1.8.0_121/bin”
    export PATH=$PATH:”/cygdrive/P/Programs/Android/SDK/build-tools/25.0.1″
    export ANDROID_HOME=/cygdrive/P/Programs/Android/SDK/
    export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    This is specific to my system, you may not need to do something like this
  3. cordova build –release android
    This will create platforms\android\build\outputs\apk\android-release-unsigned.apk
  4. CD and copy your keystore to platforms\android\build\outputs\apk
  5. jarsigner -verbose -sigalg SHA1withDSA -digestalg SHA1 -keystore your.keystore android-release-unsigned.apk keystorename
    sign it with your keystore, you may need to use a different signing method
  6. zipalign -v 4 android-release-unsigned.apk android-release-signed.apk

All done!

Published inScripting

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *