[UE 5.8.1] Android Development build crashes: libGPUCounters.so not packaged into APK

Summary

Engine Version

Unreal Engine 5.8.1 (Installed via Epic Games Launcher)

Platform

Android (ARM64)

Build Configuration

  • Development :cross_mark: Crash
  • Shipping :white_check_mark: Works correctly

Project Type

C++ Mobile Project

Issue

The application crashes immediately on startup when packaged as a Development build.

The crash occurs before the game starts, while Android is loading libUnreal.so.

Crash Log

java.lang.UnsatisfiedLinkError:
dlopen failed: library “libGPUCounters.so” not found:
needed by libUnreal.so

at java.lang.Runtime.loadLibrary0()
at java.lang.System.loadLibrary()
at com.epicgames.unreal.GameActivity.LoadLibraries()

Investigation

After investigating the engine source, I found that:

Engine/Source/ThirdParty/libGPUCounters/libGPUCounters.Build.cs

contains:

if (Target.Platform == UnrealTargetPlatform.Android &&
Target.Configuration != UnrealTargetConfiguration.Shipping)
{
PublicAdditionalLibraries.Add(BasePath + “lib/arm64-v8a/libGPUCounters.so”);

AdditionalPropertiesForReceipt.Add(
    "AndroidPlugin",
    Path.Combine(PluginPath, "libGPUCounters_UPL.xml"));

}

So every non-Shipping Android build links against libGPUCounters.so.

The library exists here:

Engine/Source/ThirdParty/libGPUCounters/lib/arm64-v8a/libGPUCounters.so

However, it is never packaged into the APK.

Packaging Log

The packaging log shows:

UPL:
Engine/Source/ThirdParty/libGPUCounters/libGPUCounters_UPL.xml

followed by:

Missing condition ‘bSupported’ in
Engine/Source/ThirdParty/libGPUCounters/libGPUCounters_UPL.xml
(skipping instruction)

Because of this, the copyFile instruction inside libGPUCounters_UPL.xml is skipped.

The folder:

/Intermediate/Android/arm64/libs/

remains empty, and libGPUCounters.so is never copied.

The final APK does not contain:

lib/arm64-v8a/libGPUCounters.so

Result

Android tries to load libUnreal.so.

libUnreal.so depends on libGPUCounters.so.

Since libGPUCounters.so is missing from the APK, Android throws:

java.lang.UnsatisfiedLinkError

and the application exits immediately.

Additional Information

  • Shipping builds work correctly.
  • Development builds always crash.
  • GPUReshape plugin is not the cause (it is Win64-only).
  • Clean rebuilds (deleting Binaries, Intermediate and Saved) do not resolve the issue.
  • Verified using UE 5.8.1 installed from Epic Games Launcher.

Expected Behavior

Development Android builds should either:

  1. Package libGPUCounters.so into the APK, or
  2. Avoid linking against libGPUCounters.so if it is not intended to be deployed.

At the moment, Development builds produce an APK that cannot start because a required native library is missing.

If needed, I can provide the complete packaging log and Android logcat.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Other

Steps to Reproduce

Create a new mobile project in UE 5.8.1.
Package for Android (Development).
Install the APK.
Launch the app.

Expected Result

The application launches normally.

Observed Result

Application crashes immediately with:

java.lang.UnsatisfiedLinkError:
dlopen failed: library “libGPUCounters.so” not found:
needed by libUnreal.so

Platform(s)

android