Android APK Generation

This guide provides detailed instructions for generating the Android APK (Android Application Package). This file is the final output of your Android mobile application development and is needed to distribute the application on the Android platform.

Prerequisites:

Ensure that you have the following tools installed and setup:

  • Flutter SDK
  • Android SDK for Android APK generation

Sensitive Information Warning: Ensure that the upload-keystore.p12 and key.properties files are kept secure and not shared publicly, as they contain sensitive information for signing the APK.

  1. Place the upload-keystore.p12 and key.properties files in the Android folder. These files can be obtained from the team lead and are required to successfully sign the APK.

  2. Open the key.properties file and update the storeFile location to match your specific context. For example, if the upload-keystore.p12 file is located at E:/Work/Rekindle-Learning/rekindle-flutter/android/upload-keystore.p12, you would update the storeFile line in key.properties as follows:

    storeFile=E:/Work/Rekindle-Learning/rekindle-flutter/android/upload-keystore.p12
    

APK Generation Process

  1. Check the version number in pubspec.yaml and in web/index.html they should be the same
  2. Initiate the APK build process.
  • Windows:

    build-client-apk.bat <CLIENT> <ENVIRONMENT> portal.rekindle[apps/learning].com
    
  • Mac:

    ./build-client-apk.sh <CLIENT> <ENVIRONMENT> portal.rekindle[apps/learning].com
    

    For example, to build the Agsa client on staging: ./build-client-apk.sh agsa staging portal.rekindleapps.com

  1. Once the build process is complete, the APK will be located at build\app\outputs\flutter-apk\app-<CLIENT><ENVIRONMENT>-release.apk.