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

Failed build Android il2cpp with permission denied error.

Discussion in 'Android' started by Aberity, Sep 17, 2017.

  1. Aberity

    Aberity

    Joined:
    Sep 17, 2017
    Posts:
    2
    Hello.

    I created Unity Project that contained an empty scene and failed to build it with il2cpp backend.
    The error message was as follows:

    Mono build had no problem.
    I tried to execute Unity as the admin user, but it did'nt make any difference.
    Please help.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,789
    Can you attempt to write a file from a different application, like Notepad, to this directory? I wonder if there is some more general problem with the permissions on that directory.
     
  3. Aberity

    Aberity

    Joined:
    Sep 17, 2017
    Posts:
    2
    Thank you for your first replay.

    I could create a text file in that directory.
    Finally, I succeeded in building an IL2CPP apk by replacing the Android NDK.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,789
    I'm glad you were able to solve the problem.
     
  5. Asse1

    Asse1

    Joined:
    Jan 9, 2013
    Posts:
    89
    Same probleme here:

    Code (CSharp):
    1. Unbehandelte Ausnahme: Unity.IL2CPP.Building.BuilderFailedException: error: unable to open output file 'C:\Repositories\CastleLife\CastleLife\05_ClientProject\Android\Packages\com.mobilemonsters.mmcl\Work\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\7885B40C220BFE0889EEFDC8F0D66F12.o': 'Permission denied'
    2. 1 error generated.
    3.  
    @Aberity What exactly do you mean by "replacing the Android NDK"? It seams like I need to use r10e.
     
  6. tayyabmain741

    tayyabmain741

    Joined:
    Jun 14, 2023
    Posts:
    12
    Hello i am having the same issue can you please tell me what do you mean by replacing the NDK