After installing 2021.3.21f1 (LTS) I cannot compile for Android in development mode

I installed 2021.3.21f and moved my project from 2021.3.18f1, and started getting the following error:

Internal build system error. BuildProgram exited with code 3.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Linq.Enumerable.WhereArrayIterator1.Select[TResult](Func2 selector)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector)
at Bee.TundraBackend.TundraBackend.AddDependency(NPath from, IEnumerable1 to, DependencyKind kind) at Bee.NativeProgramSupport.Lumping.SetupLumps(ArtifactLocationPolicy artifactLocationPolicy, List1 inputInstructions, Int32 idealFilesPerLump)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items)
at System.Collections.Generic.SparseArrayBuilder1.AddRange(IEnumerable1 items)
at System.Collections.Generic.SparseArrayBuilder1.ReserveOrAdd(IEnumerable1 items)
at System.Linq.Enumerable.Concat2Iterator1.ToArray() at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Bee.NativeProgramSupport.NativeProgram.ProduceObjectFileProductionInstructions(NativeProgramConfiguration config, ArtifactLocationPolicy artifactLocationPolicy, ObjectFileProducer[ ] objectFileProducers, NPath[ ]& additionalObjectFiles, NPath[ ]& foundHeaders)
at Bee.NativeProgramSupport.NativeProgram.SetupSpecificConfigurationImpl(NativeProgramConfiguration config, NativeProgramFormat format, ObjectFileProducer[ ] objectFileProducers)
at Bee.NativeProgramSupport.NativeProgram.SetupSpecificConfiguration(NativeProgramConfiguration config, NativeProgramFormat format, ObjectFileProducer[ ] objectFileProducers)
at Bee.NativeProgramSupport.NativeProgram.SetupLibraryDependencies(NativeProgramConfiguration config, ToolChain toolchain, ObjectFileProducer[ ] objectFileProducers)
at Bee.NativeProgramSupport.NativeProgram.SetupSpecificConfigurationImpl(NativeProgramConfiguration config, NativeProgramFormat format, ObjectFileProducer[ ] objectFileProducers)
at Bee.NativeProgramSupport.NativeProgram.SetupSpecificConfiguration(NativeProgramConfiguration config, NativeProgramFormat format, ObjectFileProducer[ ] objectFileProducers)
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.SetupIl2CppBuild() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 369
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.SetupPlayerBuild() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 171
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild()
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 165
at PlayerBuildProgramTypeWrapper.Run(String[ ] args)
at Program.Main(String[ ] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

I tried all I could find on related threads:

  • switched back to 2021.3.18f1
  • uninstalled 2021.3.21f1
  • removed library folder from project
  • tried clean builds
  • rebuilt project from just the Assets folder
  • rebooted machine (Mac running 13.2.1)

Right now i can run the code in the Editor, and can compile for Android, but I get the error above if i set the flag “Development Build”. This used to work before the update and I did not make any other changes to the project in between.

Any pointers?

Update: I did a clean reinstall of 2021.3.18f1, and the problem is still there.
It probably had nothing to do with the update to 2021.3.21f1. I must have never compiled this project with “Development Build” on for Android before. I submitted this to Unity as a bug.