Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Other game build issues

Discussion in 'Editor & General Support' started by tayyabmain741, Aug 4, 2023.

  1. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    my builds were working fine before but after enabling some settings required for google play store i have been experiencing build errors here are the settings i changed - scripting backend mono to IL2CPP enabled ARM64 package name , company name , product name , checked build app bundle , create symbols.zip - public, compression method - LZ4 and these are the errors i am facing -

    Building Library\Bee\artifacts\Android\libunity\arm64-v8a\unstripped\libunity.so failed with output:
    ld.lld: error: failed to write to the output file: Permission denied
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
    ld.lld: error: failed to write to the output file: Permission denied
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    How to troubleshoot build failures:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022:

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789
     
  3. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    i did prove that its working before enabling some settings for google play its giving errors after enabling these settings -
    scripting backend mono to IL2CPP enabled ARM64 package name , company name , product name , checked build app bundle , create symbols.zip - public, compression method - LZ4

    Building Library\Bee\artifacts\Android\libunity\arm64-v8a\unstripped\libunity.so failed with output:
    ld.lld: error: failed to write to the output file: Permission denied
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
    ld.lld: error: failed to write to the output file: Permission denied
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    but judging by the errors il2cpp and arm64 seem to be causing the problem
     
  4. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    i have confirmed that these build failures are only occuring after enbaling il2cpp and arm64 what should i do
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    As already noted above:

    https://en.wikipedia.org/wiki/Bisection_(software_engineering)
     
  6. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    My blank project doesn't build as well after enabling ilc2pp and arm64 and it gives the same errors can't write to output file Permission denied although the folder i am trying to build it in has permissions of read and write
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Now you have made progress: you KNOW that the problem has nothing to do with your project, so gently set your project to one side and go and fix your Unity installation, all the usual steps that apply to any software: redo, uninstall, different version, etc.
     
  8. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    Ok now i have reinstalled everything but this time it's from the unity archive because unity hub wasn't installing my editor but even after reinstalling everything the same error is still there permission denied failed to write to output file
     
  9. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Is your computer set to a non-EN-us locale? Some languages have unusual character codepoints that cause problems in pathnames.
     
  10. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    It's set to english united states