IL2CPP ISSUES WHEN BUILDING TO ANDROID

L2CPP ISSUES FOR ANDROID PROJECT

ERROR 1: Failed running C:\Program Files\Unity\Hub\Editor\2019.3.3f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe -out=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/tempStrip” -x=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/…/platform_native_link.xml” -x=C:/Users/suave/AppData/Local/Temp/tmp44de3935.tmp -x=C:/Users/suave/AppData/Local/Temp/tmp53415d7a.tmp -x=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/TypesInScenes.xml” -d=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed” --include-unity-root-assembly=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp.dll” --include-unity-root-assembly=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Advertisements.dll” --include-unity-root-assembly=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.UI.dll” --dotnetruntime=il2cpp --dotnetprofile=unityaot --use-editor-options --include-directory=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed” --rule-set=Conservative --editor-data-file=“C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly/Temp/StagingArea/assets/bin/Data/Managed/EditorToUnityLinkerData.json” --platform=Android --enable-engine-module-stripping --engine-stripping-flag=EnableUnityConnect --engine-stripping-flag=EnableCrashReporting --engine-modules-asset-file=“C:/Program Files/Unity/Hub/Editor/2019.3.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/Whitelists/…/modules.asset”

stdout:

Fatal error in Unity CIL Linker

System.IO.FileNotFoundException: Could not find file ‘C:\Users\suave\OneDrive\Desktop\Game Dev\Unity Projects\Projects\Fly’.

File name: ‘C:\Users\suave\OneDrive\Desktop\Game Dev\Unity Projects\Projects\Fly’

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)

at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)

at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)

at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)

at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)

at System.Xml.XmlTextReaderImpl.OpenUrl()

at System.Xml.XmlTextReaderImpl.Read()

at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space)

at System.Xml.XPath.XPathDocument…ctor(String uri, XmlSpace space)

at Unity.Linker.UnityDriver.ParseArguments(Pipeline p, UnityLinkContext context, ArrayList custom_steps, I18nAssemblies& assemblies)

at Unity.Linker.UnityDriver.Run()

at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()

at Unity.Linker.UnityDriver.RunDriver()

stderr:

UnityEngine.Debug:LogError(Object)

UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)

UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)

UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)

UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String&, String&, IEnumerable`1, UnityLinkerRunInformation)

UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)

UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)

UnityEditorInternal.IL2CPPBuilder:Run()

UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

ERROR 2: Exception: C:\Program Files\Unity\Hub\Editor\2019.3.3f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.IL2CPPBuilder.Run () (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <501fdf9059b849939e0297808b46ab08>:0)

UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <501fdf9059b849939e0297808b46ab08>: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 <501fdf9059b849939e0297808b46ab08>:0)

UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <501fdf9059b849939e0297808b46ab08>: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 <9a184ab867bb42c296d20ace04f48df3>:0)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

---------EXPLANATION OF MY ISSUE---------

-I am trying to build my project using IL2CPP and have the ARMv7 and ARM64 ticked since I am uploading to android. I’ve tried switching from .NET STANDARD 2.0 to NET 4.x but still get the same errors.

-I’ve tried reimporting packages.

-I’ve tried using different versions of Unity.

But nothing seems to work. Anyone have a clue what’s going wrong?

Thanks

I suspect the issue is the comma in the path to this project:

C:/Users/suave/OneDrive/Desktop/Game Dev/Unity Projects/Projects/Fly, Kobe, Fly

Can you submit a bug report for this issue? It looks like some command line parsing done by the UnityLinker tool does not work with commas in the path.

You can likely work around this by removing the comma from the path.

Hi sir i’m having this issue while building an apk

Win32Exception: ApplicationName=‘C:\Program Files\2019.2.17f1\Editor\Data\il2cpp/build/il2cpp.exe’, CommandLine='–convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile=“unityaot” --compile-cpp --libil2cpp-static --platform=“Android” --architecture=“ARMv7” --configuration=“Release” --outputpath=“F:\mexico-Mario\newgames\sourcecode\coockieblaster\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so” --cachedirectory=“F:\mexico-Mario\newgames\sourcecode\coockieblaster\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache” --additional-include-directories=“C:/Program Files/2019.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include” --additional-include-directories=“C:/Program Files/2019.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include” --tool-chain-path=“C:/Program Files/2019.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK” --profiler-report --map-file-parser=“C:/Program Files/2019.2.17f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe” --directory=F:/mexico-Mario/newgames/sourcecode/coockieblaster/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=F:/mexico-Mario/newgames/sourcecode/coockieblaster/Temp/StagingArea/Il2Cpp/il2cppOutput ', CurrentDirectory=‘F:\mexico-Mario\newgames\sourcecode\coockieblaster\Temp\StagingArea\assets\bin\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 C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:104)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484) UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <502f1b7df2d7430696af84c6f02852ed>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <502f1b7df2d7430696af84c6f02852ed>: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 <502f1b7df2d7430696af84c6f02852ed>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <502f1b7df2d7430696af84c6f02852ed>: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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Usually this indicates some sort of installation issue. Are you using Windows 7 or Windows 10? Please make sure that you have the latest .NET Framework version installed on the computer, and that Unity is installed with the same user account as you are using to run it.

@JoshPeterson Please help
Exception: D:\2019.4.20f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe did not run properly!

Failed running “D:\2019.4.20f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe” @“C:/Users/ghisl/Downloads/Run, Jump and Duck/Temp/StagingArea/assets/bin/Data/Managed/response.rsp”

stdout:
Fatal error in Unity CIL Linker
System.UnauthorizedAccessException: Access to the path ‘C:\Users\ghisl\Downloads\Run’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument…ctor(String uri, XmlSpace space)
at Unity.Linker.UnityDriver.ParseArguments(Pipeline p, UnityLinkContext context, ArrayList custom_steps, I18nAssemblies& assemblies)
at Unity.Linker.UnityDriver.Run()
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()
stderr:

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <8d21067e8d9c494db25a2b2485216e63>:0) UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <8d21067e8d9c494db25a2b2485216e63>:0) UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <8d21067e8d9c494db25a2b2485216e63>:0) UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <8d21067e8d9c494db25a2b2485216e63>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <8d21067e8d9c494db25a2b2485216e63>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :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 :0)
UnityEditor.Android.AndroidBuildPostprocessor.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 <8d21067e8d9c494db25a2b2485216e63>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

How might the path C:\Users\ghisl\Downloads\Run be involved here? Is that the path to the Unity project? It looks like the UnityLinker tool is attempting to ready a file in that directory, but the file cannot be read.