Creating a Release APK

saband edited this page Dec 12, 2017 · 11 revisions

Instructions for creating a signed, release APK, suitable for the Google Play Store

  1. You need to know about the Android APK signing process. If you do not, start by reading the official Sign Your App documentation.

  2. You need to create the key:

     $ mkdir ~/keystores/
     $ keytool -genkey -v -keystore ~/keystores/<your-new-key>.keystore -alias <your-key-alias> -keyalg RSA -keysize 2048 -validity 10000
    
  3. Than export some variables:

     $ export P4A_RELEASE_KEYSTORE=~/keystores/<your-new-key>.keystore
     $ export P4A_RELEASE_KEYSTORE_PASSWD=android
     $ export P4A_RELEASE_KEYALIAS_PASSWD=android
     $ export P4A_RELEASE_KEYALIAS=<your-key-alias>
    
  4. Make release apk (will be signed automatically):

     $ cd <your-project-folder>
     $ buildozer -v android release
    
  5. Optimize it:

     $ ~/.buildozer/android/platform/android-sdk-20/build-tools/23.0.1/zipalign -v 4 ./bin/Your-App-0.1-release.apk ./bin/Your-App-0.1-release-optimized.apk
    
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.