- Home /
Can't build with IL2CPP on both Windows and Android
I get 3 errors in the console:
for the first error I get this:
Win32Exception: ApplicationName='C:\Program Files\Unity\2019.4.0f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe', CommandLine='--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\ishan\Desktop\CodeJamProject\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\ishan\Desktop\CodeJamProject\Assets..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/2019.4.0f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/ishan/Desktop/CodeJamProject/Temp/StagingArea/Data/Managed --generatedcppdir=C:/Users/ishan/Desktop/CodeJamProject/Temp/StagingArea/Data/il2cppOutput ', CurrentDirectory='C:\Users\ishan\Desktop\CodeJamProject\Temp\StagingArea\Data\Managed', Native error= The requested operation requires elevation.
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at :0) UnityEditor.Utils.Program.Start () (at :0) UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0) UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at :0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at :0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at :0) UnityEditorInternal.IL2CPPBuilder.Run () (at :0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0) DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at :0) DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at :0) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at :0) UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
and for the third I get this:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in :0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
any help would be greatly appreciated
thanks
Answer by JoshPeterson · Jan 13, 2021 at 11:52 AM
I think the important part of the error message is:
The requested operation requires elevation.
This means that something is wrong with the Unity installation. Please make sure that you have installed Unity with the same user account you are using to run it. I think that will solve this issue.
Answer by aGoodProgrammer · Jan 17, 2021 at 11:44 AM
@JoshPeterson I installed a different version of unity, and migrated my project to that version and I was able to build my game for windows with IL2CPP. I have yet to test it for android
thanks for your help!
Answer by Kinix · Aug 09, 2021 at 05:00 AM
would you mind to say which version was that? :3 hehe thanks!