Build || IL2CPP_CodeGenAndCompile Error || Please Help me

Hello I have managed to fix many problems on my own, but I have not been able to find any solutions for this. Please help me. I have tried these;

  • I tried JDK and NDK in different versions, *
  • I have also tried with the latest 3 different engines with its own SDK, NDK and JDK,
  • I tried changing the file paths with special characters.
  • No problem with Mono but Play Consol requires 64bit requirement. The result of my 4 games is months of effort on this problem.
    **I am using translation please do not mind my word mistakes. Sorry

Exception: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
Annotation: IL2CPP_CodeGenAndCompile C:/Unity/theColdWar/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput/Data
Cmdline: “C:\Program Files\Unity\Hub\Editor\2021.2.0a11\Editor\Data\il2cpp\build\deploy\netcoreapp3.1\il2cpp.exe” --convert-to-cpp --compile-cpp --profiler-report --profiler-output-file=“C:/Unity/theColdWar/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/buildstate/artifacts/il2cpp_conv_dsh5.traceevents” --directory=“C:/Unity/theColdWar/Temp/StagingArea/assets/bin/Data/Managed” --data-folder=“C:\Unity\theColdWar\Library\Il2cppBuildCache\Android\armeabi-v7a\il2cppOutput\Data” --generatedcppdir=“C:/Unity/theColdWar/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput” --symbols-folder=“C:\Unity\theColdWar\Library\Il2cppBuildCache\Android\armeabi-v7a\il2cppOutput\Symbols” --map-file-parser=“C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/Tools/MapFileParser/MapFileParser.exe” --emit-null-checks --enable-array-bounds-check --code-generation-option=EnableInlining --stats-output-dir=“C:/Unity/theColdWar/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput” --platform=Android --architecture=ARMv7 --outputpath=“C:\Unity\theColdWar\Library\Il2cppBuildCache\Android\armeabi-v7a\Native\armeabi-v7a\libil2cpp.so” --dont-deploy-baselib --tool-chain-path=“C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer/NDK” --libil2cpp-static --baselib-directory=“C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer\Variations\il2cpp\Release\StaticLibs\armeabi-v7a” --avoid-dynamic-library-copy --additional-ınclude-directories=“C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include” --additional-ınclude-directories=“C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include” --ıncremental-g-c-time-slice=3 --configuration=Release --dotnetprofile=unityaot --cachedirectory=“C:\Unity\theColdWar\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache”
ExitCode: 1
Stdout:
Either unknown arguments were used or one or more assemblies could not be found :
–additional-�nclude-directories=C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include
–additional-�nclude-directories=C:/Program Files/Unity/Hub/Editor/2021.2.0a11/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include
–�ncremental-g-c-time-slice=3

at il2cpp.Program.DoRun(String[ ] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <0e29c6fa484546b69131e62ea7005ea3>:0)
UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <0e29c6fa484546b69131e62ea7005ea3>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at <0e29c6fa484546b69131e62ea7005ea3>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <0e29c6fa484546b69131e62ea7005ea3>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <0e29c6fa484546b69131e62ea7005ea3>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <0e29c6fa484546b69131e62ea7005ea3>:0)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9308c83cad8f4cf2b6c96fcf8765330f>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9308c83cad8f4cf2b6c96fcf8765330f>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <9308c83cad8f4cf2b6c96fcf8765330f>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <9308c83cad8f4cf2b6c96fcf8765330f>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, 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 <0e29c6fa484546b69131e62ea7005ea3>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

This is a known bug that occurs when there are spaces in the path to the Unity installation. I believe that this is corrected in the latest Unity release though. Can you give that a try?

I got the project output directly to the Z: directory, but the error is the same again. :frowning:

I believe the problem here is not the project path, but the Unity installation path. Can you try to install Unity to a path without spaces?