Hello,
We upgraded to Gradle 8.7 with AGP 8.5.2, compiling Android with SDK 35 on UE 5.4.4.
For the setup, we followed the guide provided in this link: https://github.com/EpicGames/UnrealEngine/commit/474ce22414400b9944a2b791c76da35846d62e2d
And we got error as below :
Build file ‘<game_path>\Intermediate\Android\arm64\gradle\app\build.gradle’ line: 1
A problem occurred evaluating project ‘:app’.
> Failed to apply plugin ‘com.android.internal.application’.
We are using VS 2022, NDK 25.1.8937393, and Java 17, with the environment variables already configured.
Could you please take a look and suggest possible solutions for this issue?
Let us know if you need more info.
Thanks a lot,
Nga Le
Hi Nga,
I was able to successfully backport stock 5.4.4 wutg Gradle 8.7 BSAGP 8.5.2 and built a sample targeting SDK 35/Compile SDK 35 without that gradle error. Does wiping the Gradle caches and deleting the <gamedir>/Intermediate/Android directories help?
Best regards.
Hello [Content removed]
My apologies for the late response, I was on an extended holiday.
After wiping the Gradle caches and deleting the <gamedir>/Intermediate/Android directories, the error still persisted.
I finally found the cause: the issue occurs because the android.bundle.enableUncompressedNativeLibs flag was defined in gradle.properties.
This flag should be removed when using AGP 8.0 or higher.
I sincerely apologize for the delayed response, and I truly appreciate your answer.
Best Regards,
Nga Le
Hi Nga,
Thanks for for that information. android.bundle.enableUncompressedNativeLib was indeed deprecated in Gradle 8.0, however I don’t see anywhere in the generation gradle.properties in 5.4 where android.bundle.enableUncompressedNativeLib is defined by UE. Was this property added in a <gradleProperties> node in a plugin or application UPL xml file or in a separate Java library?
Best regards,
Stephane
Hi [Content removed]
You are absolutely right — the issue lies in the UPL XML file of a plugin, not in UE.
Best Regards,
Nga Le
Thanks for confirming Nga. If this isn’t an internal plugin and you are in a position to share its identity, we can try to let the original developer know.
Best regards.
Hi [Content removed]
It is an internal plugin. I really appreciate your kind and dedicated support.
Thanks a lot,
Nga Le
Thanks for confirming that Nga.
Best regards.