Unable to build

Hello, trying to build out an apk is giving errors. hope it has a solution!

Unity Editor version: 2022.2.0b8 and 2022.2.0b9
ML2 OS version: na
MLSDK version: 0.53.3
Host OS: (Windows/MacOS) Windows 10

Error messages from logs (syntax-highlighting is supported via Markdown):

C:\Program Files\Unity\Hub\Editor\2022.2.0b9\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --generatedcppdir=E:/Unity Projects/MagicLeap2ShapesXRTest/Library/Bee/artifacts/Android/il2cppOutput/cpp --enable-analytics --emit-null-checks --enable-array-bounds-check --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=E:/Unity Projects/MagicLeap2ShapesXRTest/Library/Bee/artifacts/il2cpp_conv_iby2.traceevents --print-command-line --data-folder=E:/Unity Projects/MagicLeap2ShapesXRTest/Library/Bee/artifacts/Android/il2cppOutput/data
Error: IL2CPP error (no further information about what managed code was being converted is available)
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Initialize(UnderConstruction`2& systemAssembly)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Build()
at Unity.IL2CPP.AssemblyConversion.Phases.InitializePhase.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.Classic.ClassicConverter.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.AssemblyConverter.ConvertAssemblies(AssemblyConversionContext context, ConversionMode conversionMode)
at Unity.IL2CPP.AssemblyConversion.AssemblyConverter.ConvertAssemblies(TinyProfiler2 tinyProfiler, AssemblyConversionInputData data, AssemblyConversionParameters parameters, AssemblyConversionInputDataForTopLevelAccess dataForTopLevel)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Building E:\Unity Projects\MagicLeap2ShapesXRTest\Library\Bee\artifacts\unitylinker_xy1a.traceevents failed with output:
C:\Program Files\Unity\Hub\Editor\2022.2.0b9\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/Android/ManagedStripped --include-link-xml=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed\MethodsToPreserve.xml --include-link-xml=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=E:/Unity Projects/MagicLeap2ShapesXRTest/Assets..\Temp\InputSystemLink.xml --include-link-xml=E:\Unity Projects\MagicLeap2ShapesXRTest\Temp\burst.link.xml --include-link-xml=C:/Program Files/Unity/Hub/Editor/2022.2.0b9/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/AndroidNativeLink.xml --include-directory=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed --profiler-report --profiler-output-file=E:/Unity Projects/MagicLeap2ShapesXRTest/Library/Bee/artifacts/unitylinker_xy1a.traceevents --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --platform=Android --use-editor-options --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2022.2.0b9/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset --editor-data-file=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.XR.ARFoundation.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/UnityEngine.XR.MagicLeap.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.XR.Interaction.Toolkit.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/ShapesXr.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.XR.CoreUtils.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.RenderPipelines.Core.Runtime.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/MagicLeap.SDK.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.RenderPipelines.Universal.Runtime.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.XR.Management.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/Unity.InputSystem.dll --include-unity-root-assembly=E:/Unity Projects/MagicLeap2ShapesXRTest/Temp/StagingArea/Data/Managed/ShapesXr.Common.dll --print-command-line --enable-analytics
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'MessagePack.Annotations, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null'
at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable1 assemblies) at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type) at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference) at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider, DependencyInfo& reason, IMemberDefinition sourceLocationMember) at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet1 typesAlreadyVisited)
at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.UnityRun(UnityLinkContext context, UnityPipeline p, LinkRequest linkerOptions, TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

1 Like

Are you able to build and deploy the Unity Examples project without any issues?

yes I was able to build example scenes, and determined that this error is related to adding in the ShapesXR unity integration, when that integration is not present or after it is deleted and the editor is restarted then the scenes will build. I informed them.