Search Unity

Bug Unable to Build my projects

Discussion in 'Editor & General Support' started by Necoh, Jan 22, 2023.

  1. Necoh

    Necoh

    Joined:
    Jan 18, 2023
    Posts:
    5
    Hello!
    I'm following Unity Tutorials and trying to build my projects to share them (as suggested by the tutorials themselves).
    Sadly I appear not to be able to do so ):
    I even tried to build an empty project and still it wouldn't let me build it.
    I'll attach a screen of the errors.
    How may I solve this problem?

    Thank you in advance for the help!
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    How to troubleshoot build failures:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022:

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789
     
  3. Necoh

    Necoh

    Joined:
    Jan 18, 2023
    Posts:
    5
    I'm in the first case, I reinstalled the version of Unity (last LTS available, (2021.3.16f1) and it still doesen't let me build.
    How do I solve the issue?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    Recheck your installation process, make sure everything is set up, reboot your machine, etc.

    If you can't get it working, try a different LTS version.
     
  5. Necoh

    Necoh

    Joined:
    Jan 18, 2023
    Posts:
    5
    Just reinstalled again the "recommended" version and still can't manage to build an empty file...
    Do I really have to switch version?
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    You don't really "have to" do anything, I'm simply listing things that have worked for me and others.
     
  7. Necoh

    Necoh

    Joined:
    Jan 18, 2023
    Posts:
    5
    Well, if there is a way to make the recommended version work I'd be really happy to do so!
    If you think it could help, tomorrow I'll be available also for calls
     
  8. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    721
    Click on that first error -- the one with STDOUT. It probably has more lines of text.

    The console will only show two lines from each error.
     
  9. Necoh

    Necoh

    Joined:
    Jan 18, 2023
    Posts:
    5
    Sure, it says:
    "Internal build system error. Backend exited with code 2. STDOUT: Finished compiling graph: 243 nodes, 756 flattened edges (756 ToBuild, 0 ToUse), maximum node priority 152 [ 1/242 0s] WriteText Library/Bee/artifacts/emscripten/gjrl9/wrapper_emar.bat [ 2/242 0s] WriteText Library/Bee/artifacts/emscripten/v7znj/wrapper_emcc.bat [ 3/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/3o8n_System0.lump.cpp [ 4/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/5ay2_System1.lump.cpp [ 5/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/y8mn_vm6.lump.cpp [ 6/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/wj5b_System1.lump.cpp [ 7/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/wj5b_System0.lump.cpp [ 8/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/y8mn_vm4.lump.cpp [ 9/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/jkdf_Posix0.lump.cpp [ 10/242 0s] MakeLump Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/wj5b_System2.lump.cpp"

    But I don't really know how to use that in order to solve this problem.
    Also, the following one talks about stuff going on in the PostProcess, but still don't know what to do about it (I've already tried to mess around with postProcess settings and disabling it, but still nothing happens)

    BuildFailedException: Incremental Player build failed! UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <11d97693183d4a6bb35c29ae7882c66b>:0) UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:179) UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <11d97693183d4a6bb35c29ae7882c66b>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <11d97693183d4a6bb35c29ae7882c66b>:0) UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)