Configure your project and build the application
To build an APK from your Unreal Engine project that can be tested on a mobile device with Arm Mobile Studio tools, follow these steps:
- Go to Edit > Project Settings > Platforms > Android SDK and check that the paths to your Android SDK, NDK and Java JDK are set correctly. These are required in order to compile the program.
- Next, go to Platforms > Android and select Configure Now.
- Consider setting the following options:
- Android Package Name - change this to something that will identify this application, for example, com.mycompany.mygame. You will need to look for this name when capturing data from the device with Arm Mobile Studio tools.
- Package game data inside .apk? - Choose this setting to combine the OBB data in to the same file instead of building a separate OBB file.This makes the APK easier to upload to a device when using Android Debug Bridge (
- Support armv7/arm64 - Choose whether to support 32-bit (armv7) and or 64-bit (arm64) architectures. Selecting both significantly increases the size of the APK.
- Support OpenGL/Vulkan - Choose whether you want to build an OpenGL or Vulkan compatible application, or both.
Note: Be aware of the following limitation in Performance Advisor when generating reports for Vulkan applications - Slow capture with lwi_me.py on Vulkan applications.
- In Project Settings > Project > Packaging > Project, ensure that the For Distribution checkbox is not set. We want the APK to be debuggable, so that Arm Mobile Studio tools can collect data from it; this can not be done with a production build.
- Before packaging your project into an APK, use the Compile button on the Unreal Editor toolbar to test that your code compiles correctly. This reports any compilation errors in your code, and provides an output log at the bottom of the editor. Resolve any errors you find before packaging your project.
- To package your project into an APK, select File > Package Project > Android > Android (Multi:ASTC, DXT, ETC2) and specify an output directory for the file. Be aware that packaging might take some time, depending upon the size of your application.
Your APK can now be profiled with Arm Mobile Studio tools, and your markers will be displayed in Streamline and any Performance Advisor reports you generate. Refer to Get started with Performance Advisor for instructions on how to profile your application. In addition to the Performance Advisor report, you can also explore the Streamline capture, to see in detail how your game uses the CPU and GPU resources in the device.