Package a game for Android - AWS GameKit

You are currently viewing content for use with Unreal Engine software. See all AWS GameKit documentation

Package a game for Android

When packaging your game for Android, complete the following tasks.

Unreal Engine

For Unreal Engine game projects, follow the Unreal Engine project packaging instructions, with the following modifications.

  1. Before you start the packaging setup process, verify your current AWS GameKit plugin configuration. The Unreal packaging process will use whichever AWS GameKit configuration settings are currently active. In the Unreal Editor toolbar, open Edit, Project Settings and go to the AwsGameKit plugin section. In the Environment and Credentials section, verify the selections for game title, environment, and region.

  2. Complete the Unreal packaging step "Setting a Game Default Map".

  3. Add the AWS GameKit configuration in the packaging settings.

    1. In the Unreal Editor toolbar, choose Edit, Project Settings, Packaging, and expand the Packaging advanced settings, as shown.

    2. In Additional Non-Asset Directories to Package, add an array element and enter the value certs.

    3. In Additional Non-Asset Directories to Copy, add an array element and enter the value GameKitConfig.

  4. Configure the game project for Android. In the Unreal Editor, open Edit, Project Settings, Platforms, Android. If the project hasn't yet been configured, choose Configure Now.

  5. In the APK Packaging section, set the following values:

    1. Set Target SDK version to 24.

      Note

      AWS GameKit has been tested on this SDK version. You might need to use another version depending on the device you're building for.

    2. Select the option Use ExternalFilesDir for UE4Game files.

  6. In the Build section, select the option Support armv7.

  7. In the Advanced APK Packaging section, under Extra Permissions add array elements with the following values:

    • android.permission.WRITE_EXTERNAL_STORAGE

    • android.permission.READ_EXTERNAL_STORAGE

  8. Specify the Android SDK for your game project. In the Unreal Editor, open Edit, Project Settings, Platforms, Android SDK.

    1. Set the following directory locations to match your installation:

      • Location of Android SDK

      • Location of Android NDK

      • Location of Java

    2. Set SDK API Level to the value matchndk.

    3. Set NDK API Level to the value android-24.

  9. When you're ready to package your game for shipping, continue on to the Unreal packaging step "Creating Packages" to package the game for the Android platform of your choice.

  10. Connect your Android device, and select Launch.

Troubleshoot packaging issues

Missing script error

If you get an error message concerning a missing script, verify that you are using version 30.0.3 of the build tools.

API level errors

If you get the following errors, install Android API Level 29 in Android Studio and package again.

UATHelper: Packaging (Android (ASTC)): …\GameActivity.java:3217: error: cannot find symbol UATHelper: Packaging (Android (ASTC)): powerManager.addThermalStatusListener(getMainExecutor(), new PowerManager.OnThermalStatusChangedListener()