Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

il2cpp build failing with Win32Exception - help appreciated!

Discussion in 'Android' started by DanTaylor, Aug 24, 2020.

  1. DanTaylor

    DanTaylor

    Joined:
    Jul 6, 2013
    Posts:
    119
    Hey there.
    I am trying to update an old app to comply with Google's new 64-bit regulations.
    I upgraded the project from Unity 5 to v2017.4.40f1 so I could build 64-bit withough having to rework too much stuff.
    However, I can't seem to get it to build - no matter what I try, I get the same error...
    I have no idea what this error log is trying to tell me. Any idea what I might do to fix this? It is driving me bonkers! :(

    Thanks in advance,
    Dan
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Is there another error message in the console or the editor log? There might be another one with more details about the cause of the error.
     
  3. DanTaylor

    DanTaylor

    Joined:
    Jul 6, 2013
    Posts:
    119
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I don't see any other errors that jump out at me. Can you check the version of .NET Framework that is installed on this machine? If possible, try to upgrade it to .NET FW 4.8.1 (the latest version). Also, it might be worth trying to build a new empty project. That might indicate if this issue is something in the project, or a more general problem.
     
  5. DanTaylor

    DanTaylor

    Joined:
    Jul 6, 2013
    Posts:
    119
    I think I have found the issue!
    I updated my .NET installation, and created a blank project, as you suggested... still no dice... but it helped me to narrow down the issue!
    Then I found this forum thread: https://forum.unity.com/threads/il2cpp-win32exception-build-error-for-android-platform.487417/
    Reading through I tried to execute il2cpp from the command line, it still wouldn't work.
    So instead of launching the blank project from the Unity Hub I launched Unity from the desktop as an Administrator.
    The build on the blank project worked!
    To fix this properly I set the properties on the Unity, the Unity HUB and il2cpp executables to always launch as an Administrator.
    My full project gets a little further ... then hits a new snag... but at least the new error message provides some actionable clues. I'll investigate and let you know how it goes...
     
  6. DanTaylor

    DanTaylor

    Joined:
    Jul 6, 2013
    Posts:
    119
    All sorted. Setting everything to run as Administrator has fixed the issue (see above).