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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Hi a new fail to build on andoid Error

Discussion in 'Android' started by picpic1979, Apr 22, 2022.

  1. picpic1979

    picpic1979

    Joined:
    Feb 11, 2015
    Posts:
    6
    Hi, i have an error when i try to build on android, this is the error

    Building Library\Bee\artifacts\Android\Features\System.IO.Compression.FileSystem-FeaturesChecked.txt failed with output:
    System.UnauthorizedAccessException: Access to the path 'C:\Users\anthony\Desktop\testmobile\Library\Bee\artifacts\Android\Features\System.IO.Compression.FileSystem-FeaturesChecked.txt' is denied.
    at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
    at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
    at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
    at System.IO.StreamWriter..ctor(String path)
    at System.IO.File.WriteAllText(String path, String contents)
    at NiceIO.NPath.SystemIOFileSystem.File_WriteAllText(NPath path, String contents)
    at NiceIO.NPath.WindowsFileSystem.File_WriteAllText(NPath path, String contents)
    at NiceIO.NPath.WindowsFileSystem.File_WriteAllLines(NPath path, String[] contents)
    at NiceIO.NPath.WriteAllLines(String[] contents)
    at PlayerBuildProgramLibrary.FeatureExtractor.Run(CSharpActionContext ctx, Boolean ignoreSystemDlls)
    UnityEditor.GenericMenu:CatchMenu (object,string[],int)



    I really missing some thing, did someone had the error in past ?

    Unity version 2021.2.1.19 the last one

    thanks
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,672
    Do you by chance have anti virus enabled? Maybe it's locking that file. Excluding Unity project folder might help.
     
    probitaille likes this.
  3. probitaille

    probitaille

    Joined:
    May 5, 2015
    Posts:
    34
    I got the exact same error. In my case, disabling the Anti-Virus fix the issue.