Android build failing for task app:packageDebug

Hi, I have been successfully building my android installs for months. Unfortunately a hard drive issue forced me to reinstall Unreal 4.26 and android studio. Now I have a gradle issue I can’t resolve.

The error message is Task :app:packageDebug FAILED.

When I run debug using ‘rungradle.bat :app:assembleDebug --scan’ I receive the following:

What went wrong:
Execution failed for task ‘:app:packageDebug’.
> A failure occurred while executing$ActionFacade
> Entry ‘AndroidManifest.xml’ name differ (25 vs 19)

I have attached my AndroidManifest file from my project\intermediate\android\arm64\gradle\app\scr folder. There is no reference to 25 or 19 (which I assume refers to sdk versions).
I also attached an AndroidManifest (called it AndroidManifest2) from the Intermediate\Android\arm64\gradle\app\build\intermediates\bundle_manifest\debug\bundle-manifest director. It shows sdk’s set to 28.

In Unreal project settings my SDK and NDK API settings are “latest”. Minimum SDK version is 28 and Target SDK version is 28.

I have tried the following:

  • Set up as per the Unreal documentation.
  • Set up following the video “Packaging for Android”:
  • Set memory allocated to have with _Java_Options: -xms2048m -Xmx2048m
  • Updating SDK’s using Android Studio so I now have API levels 28, 29 and 30 installed.
  • I have deleted the Save and Intermediate folders.

Any suggests on how to resolve this would be greatly appreciated.

The default install only included SDK version 30. I loaded SDK 28, deleted all supporting file directories like saved, build and intermediate. Switched the project settings to use specifically SDK28 (not ‘latest’) and rebuilt. Finally worked.