delphi

How to compile Android app to get aab file?


I am using Delphi 12 and compiling Android 32/64 or debug/release produce .apk file but I need to get .aab file.

I tried compile and build also I tried deploy from project menu. All produce apk only

How I can get .aab file ?


Solution

  • Check that you have enabled the Generate Android App Bundle file (arm + arm64) option in the project options.

    Per Delphi's documentation:

    Submitting Your Android App to Google Play: Android App Bundle Support

    To generate an App Bundle follow these steps:

    • Open your application's project.
    • Select Release as the active build configuration. (This is an optional step, but it is generally used for distribution cycles).
    • Select Android 64-bit as the active target platform.
    • Select Application Store as the active build type.
    • Click Project > Options menu item.
    • On the Options dialog
      • Navigate to the Building > Delphi Compiler > Compiling options.

      • Select All configurations - Android 64-bit platform as the active target.

      • Enable the Generate Android App Bundle file (arm + arm64) option.

      • Navigate to Deployment > Provisioning options page.

      • Select All configurations - Android 64-bit platform as the active target.

      • Fill the data about the key used to sign the application.

      • Run the application with or without the debugger. (Or alternatively, build and deploy the application).

      • Running the application with or without a debugger has the benefit of displaying the resulting message.

        Note: You can not run or debug an App Bundle. To debug the application you have to use .APK package format for each platform separately (32-bit and 64-bit).

    Upon a successful app bundle generation, the IDE presents a dialog containing the .aab file path.

    The generated .aab file is signed and ready to upload to the Google Play Console.

    Once the file is generated you can upload it to the Google Play Console.