Unreal 5.5 fails to set namespace of plugin when building for Android

We develop a plugin that utilizes an APL.xml file which has so far worked in previous version of UE up to 5.4. However, in 5.5, projects using the plugin can no longer package for Android. The error generated is:

UATHelper: Packaging (Android (ASTC)): A problem occurred configuring project ':example_plugin.
UATHelper: Packaging (Android (ASTC)): > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
UATHelper: Packaging (Android (ASTC)):    > Namespace not specified. Specify a namespace in the module's build file: Z:\example_plugin\build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
UATHelper: Packaging (Android (ASTC)):      
UATHelper: Packaging (Android (ASTC)):      If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

In our APL.xml file, we have been specifying the plugin’s name with:

<activity android:name="com.exampleorganization.exampleplugin"/>

However this value is not propagated to the generated build.gradle file in

ExampleProject\Intermediate\Android\arm64\gradle\

and the build subsequently fails with the error mentioned above.

How can we specify the namespace of our plugin in a manner compatible with UE 5.5’s UnrealBuildTool and the required version of Gradle?

1 Like