Search Unity

UnityLinker.exe did not run properly!Android

Discussion in 'Android' started by xpath, May 20, 2019.

  1. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    It looks like there is a comma in the path to your project: "D:\Star Legion\I, Best TikToker1". Can you try to remove that? It seems to be causing the linker to fail.
     
  2. oleh_baziv

    oleh_baziv

    Joined:
    Jan 3, 2018
    Posts:
    3
    Thank you, deleted the comma from the name and everything was compiled) Thank you very much)
     
  3. canstig

    canstig

    Joined:
    Jul 25, 2017
    Posts:
    3
    @JoshPeterson I am found issue. Problem was in the NSubstitude library. Library target platform was Editor platform and in Unity 2018 works fine, but after switch to Unity 2019 for some reasons Unity started trying to include this library into the UWP build. When I updated this library to newest and move library to Editor folder, issue was solved.
     
    ghaninasab likes this.
  4. ghaninasab

    ghaninasab

    Joined:
    Oct 23, 2020
    Posts:
    1
    Last edited: Oct 27, 2020
  5. GCI

    GCI

    Joined:
    Oct 9, 2020
    Posts:
    8
    I have tired all of this and nothing changed
     
  6. GCI

    GCI

    Joined:
    Oct 9, 2020
    Posts:
    8
    Hello @JoshPeterson. i still get the Unity linker error
    please help
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Can you post the specific error message that you see?
     
  8. GCI

    GCI

    Joined:
    Oct 9, 2020
    Posts:
    8

    Attached Files:

  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Can you post the full error message from the lower pane, as text?
     
  10. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Hi I'm experiencing an error during build 'Unity linker error' in unity 2019.4. My build platform is Android x64 using ilcpp. I used to solve this in unity 2018 by running unity as an administrator but it's not possible in unity 2019 as we use hub now. Thank you
     
  11. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,919
    Could you show the full error? Or attach Editor.log?
     
  12. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Sure. I will reproduce the errors as I've changed back to mono backend to see if the build was working. Well build work with mono backend. But as I said I will reproduce and send you the error logs as soon as I've them.

    As you are from unity. I've another question when I run my game on Android device (open gl es 3.2 also using vulkan api) I'm trying to test URP performance on Android. So I experienced flickering issues or some weird black grungy glitch on some places not whole screen. If you want I can send the screenshot here. I know it's the not the appropriate thread but it's the issue I'm also having. Could be it due to using both fxaa and msaa?


    Hi i've reproduced the errors and i'm attaching the error logs https://www.dropbox.com/s/25cfhxzh9vfaap3/EditorLog.txt?dl=0
     
    Last edited: Apr 24, 2021
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Regrading the error from UnityLinker in that log file, this usually means that you need to install the latest version of .NET Framework on your computer. The Unity Hub should do that, but sometimes that .NET Framework version is missing.

    You can download it from Microsoft here: https://dotnet.microsoft.com/download/dotnet-framework
     
    mukki014 likes this.
  14. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Thank you. I will try this and let you know the results. Rendering pipeline shouldn't be an issue? Because I've switched back to standard pipeline.
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I'm unfamiliar with the rending pipeline code, so I can't say, sorry!
     
    mukki014 likes this.
  16. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    No problem. And thank you I've tried install net framework 4.8 but I couldn't because my windows aren't updated to meet the system requirements. Thank you again.
     
  17. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    Hello everyone, we have similar problem.
    Editor:
    - Windows 10 64-bit
    - Unity 2020.3.18f1 (Installed from Unity Hub)

    Build:
    - target platform - Android
    - IL2CPP enabled
    - unsafe code is allowed and used

    There is error, that i get:
    Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.18f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @D:/GCO_2020/Temp/StagingArea/assets/bin/Data/Managed/response.rsp

    stdout:
    Fatal error in Unity CIL Linker
    Mono.Linker.MarkException: Error processing method: 'System.Void System.Span`1::.ctor(T[])' in assembly: 'System.Memory.dll'
    ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=null'
    at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)
    at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type)
    at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference)
    at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedMethod(MethodReference reference)
    at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedMethod(MethodReference reference)
    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    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 <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c8b3b39837d14a59b516963b78bf9032>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c8b3b39837d14a59b516963b78bf9032>: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 <c8b3b39837d14a59b516963b78bf9032>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <c8b3b39837d14a59b516963b78bf9032>: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 <5ad584e208e14caaa9e6b2e6027e9204>:0)
    UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    CustomBuildOptions:Build() (at Assets/GameContent/Scripts/Editor/CustomBuildOptions.cs:211)
    CustomBuildOptions:OnGUI() (at Assets/GameContent/Scripts/Editor/CustomBuildOptions.cs:402)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    It looks like your project might be using System.Memory.dll from NuGet maybe. That DLL usually depends on System.Runtime.CompilerServices.Unsafe.dll, which Unity does not provide. Can you also include System.Runtime.CompilerServices.Unsafe.dll from NuGet in your project?

    Alternatively, Unity version 2021.2 (and later) supports the .NET Standard 2.1 API, which includes Span, so there is no need for a separate System.Memory.dll in the project.
     
    mitaywalle likes this.
  19. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    Thank you, for fast answer. I'll try to research, are we using System.Memory.dll or not.
    And I'll try to add System.Runtime.CompilerServices.Unsafe.dll by hand to project.

    2021.2 is too early beta for our production, unfortunately.