Reproduction steps:
1. Open the attached project “ReproProject”
2. Navigate to File → Build Profiles
3. Make sure that Android platform is selected
4. Build the Player by clicking on “Build” button
5. Wait till the end of the building process
6. Observe the result
Actual result: The build process fails with error “IL2CPP error for method 'System.Boolean UnityEngine.XR.ARFoundation.InternalUtils.SubsystemUtils::TryGetLoadedSubsystem(TSubsystemBase&)“
Expected result: The build process finishes successfully
Reproducible in: 6000.0.70f1 6000.3.11f1
Could not test with: 2023.1.20f1, 6000.0.5f1, 6000.4.0b12, 6000.5.0a8 (unsolvable compilation errors, Gradle build failure)
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Note: If AR Foundation package is removed, different error is produced (IL2CPP error for method 'T& Unity.Burst.Unsafe::AsRef(System.Void*)) at the end of the building process. More information can be found in the internal notes