Package Project for android VR failed, need help!

Hello there @niall010!

Thank you for the log extract, this looks like a tricky scenario. From what I can see, the chain starts to break in the following line:

Unhandled exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at EpicGames.Core.FileSystemReference.ContainsName(String name, Int32 offset, Int32 length) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\Shared\EpicGames.Core\FileSystemReference.cs

This call suggest that the build is trying to reach for a missing or incorrect path. The first step would be to confirm that all file path are correctly set in your project, as well as ensure that your Android SDK, NDK, and JDK are in the proper versions. A similar scenario was encounterd here:

If the issue persists after that, I would suggest refreshing the build, via deleting the contents from folders Intermediate, Binaries, and Saved, then regenerating and rebuilding the project.

Finally, make sure that all elements tied to Visual Studio 2022 are also properly setup: