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

Error when building

Discussion in 'iOS and tvOS' started by imparare, Oct 28, 2008.

  1. imparare

    imparare

    Joined:
    Jun 24, 2008
    Posts:
    369
    I have this error

    <EDIT> Bug report submitted
     
  2. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    FYI everyone, this error was caused by saving the built player folder inside the project's assets folder. Generally, you should always save your builds outside of the assets folder (but inside the project folder, alongside the assets folder is okay).
     
  3. fleggyCakes

    fleggyCakes

    Joined:
    May 4, 2009
    Posts:
    3
    I am not doing this, but I have the same error.
     
  4. AbhishekS

    AbhishekS

    Joined:
    Dec 15, 2008
    Posts:
    157
    @Ulognep
    Even im not saving the build folder inside the assets folder. The project was working fine before but suddenly it started giving this problem. im only getting ths problem for this particular project rest of the project r working fine.

    Currently the only way to solve this was to created the whole project again but its very much painful to sit and recreate the whole game.

    plz have a look at this problem.
     
  5. Deleted User

    Deleted User

    Guest

    i Just answered in a similar post

    "I had the same problem and was caused because i moved my project to a different directory, so simply Unity can't find Temp Folder.

    Solution, replace project in previous directory folder or make a new Build Settings and save to the new Directory. ( not Build and Run, only Build) "

    Andrea
     
  6. friken

    friken

    Joined:
    May 1, 2009
    Posts:
    84
    I have had this issue several times now. The player was saved inside the project directory but not inside the assets directory. The directory name has not changed or been moved.

    The only solution once it happens I have found is to create a new project, move all assets over, resetup everything. Luckily our projects have been perf test stuff, but this would be a huge problem for big projcts.... not a good solution.

    note: I am on mac Unity iphone, newest version.
     
  7. AbhishekS

    AbhishekS

    Joined:
    Dec 15, 2008
    Posts:
    157
    ya ur correct the only solution for this problem i came up is to recreate the whole project
    mine project is a big one its took couple of days to get everything working
     
  8. Randimonium

    Randimonium

    Joined:
    Jun 27, 2009
    Posts:
    17
    I don't have a solution but here is what I did before the error started happening.

    1. build run game on my iPhone
    2. Delete all of the scenes except the 1 that I was using and another 1 that I wasn't using. These scenes I deleted were part of the game in build settings.
    3. try to build and run again = error
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Just delete the build folder it creates and it should work again. if not, a restart of Unity iPhone commonly does
     
  10. yogeez

    yogeez

    Joined:
    Mar 4, 2009
    Posts:
    129
    If this happens than i think should go for a build option only and select the main folder for the build. And run test it
     
  11. FWCorey

    FWCorey

    Joined:
    Feb 2, 2011
    Posts:
    42
    I got this error and noticed that there were multiple instances of explorer running under Windows 7 Ultimate. Every time Unity creates a build it launches an explorer window showing the folder that the build was in. These create a new embedded Explorer process (You will see it in Task Manager as x:\Windows\Explorer.exe /factory,{guid} -Embedding)

    When you close these windows the process doesn't exit cleanly and after enough builds it will first start throwing this error then lock up Unity entirely when building.

    Solution:
    You will need to have the "Command Line" column enabled in your Task Managers view. (View - Select Columns)

    1. Close Unity, (may have to End Task a second unity process)
    2. End task all of the Explorer /factory processes.
    3. Do a build in an empty directory.

    Everything should be back to normal. If not ensure you don't have any files in the _Data folder of your build directory open in another program. (Unity deletes this folder before building)
     
    Last edited: Feb 2, 2011
  12. AntonioT

    AntonioT

    Joined:
    Feb 3, 2010
    Posts:
    17
    I am getting this error. Last night it worked fine, I made a build at about 1am. Went to bed, woke up at 7am. Rebuilt failed. Same error over and over again. Nothing changed, did not restart the machine, did not pass go, did not collect 200.

    Tried everything suggested in here, from creating new folders to deleting original folders. The error is always related to copying files from the webplayer templates directory. No file name is mentioned, just the directory.

    So I now cannot use Unity at all. Surely there is something more concrete than all the various reasons in here that identify the source of this issue ? It seems quite clear that the source is not at all understood if the solutions presented have been so wide and varied ?
     
  13. rhmitul

    rhmitul

    Joined:
    Nov 8, 2011
    Posts:
    1
    Go to Google and search for {(missing dll name) download}. then download the Dll file,and pest your system 32 folder ... solved.
     
  14. ActionScripter9109

    ActionScripter9109

    Joined:
    Jun 20, 2012
    Posts:
    1
    FWCorey, your answer solved this error for me. Specifically this line:

    Turns out, I had opened the runtime log file in Notepad after the last build, and when I went to rebuild, it was causing the error. Closing Notepad solved the issue.

    I hope this helps anyone else who stumbles across this thread.
     
  15. resi7h

    resi7h

    Joined:
    Aug 4, 2013
    Posts:
    1
    Hello guys, i can answer your problem telling only you need check a option in the unity access link to Administrator mode.

    This problem is normal in all versions after windows XP.

    Thank you all.
     
  16. semiessessi

    semiessessi

    Joined:
    Jun 14, 2013
    Posts:
    3
    yes, all of the suggestions here are voodoo magic, its not even clear if everyone is having the same issue or just the same symptom. i am not able to debug the problem with any great success either though. however i can provide some useful information...

    i am leaning very heavily towards considering this a bug within Unity because:

    * i had the problem on our automated test server - in a clean checkout of a project on a clean machine - the same data works fine on three other machines
    * opening the editor and doing a build myself on that machine works fine and i tried using precisely the same path. the problem only occurs when doing a build from command line
    * the reporting of this error is not being handled gracefully - it seems unexpected
    (* insert rant about brainless use of exceptions and allowing the shoddiness of your duplo block style of programming to ever be seen by an end user)

    the error message tells us the problem thankfully - a file copy failed. i can rule out the most common reasons for this happening, here are my findings:

    * the path definitely exists, the build script creates it i can inspect it myself and copy files in there myself, i can build to the path if i run the editor myself.
    * there are no file lock problems - the target folder for the build is completely empty - the copy that fails is copying to a location where there is an empty folder. there is no possible file lock scenario that can hinder this afaik.
    * permissions are not the issue - the target folder is created by a process started by the same user as part of the build process. it is possible that unity goes out of its way to do something especially stupid with permissions, but this is highly unlikely imo. i can't imagine it being the case unless a programmer went out of his way to break this code in a mysterious way...
    * i have tried all of the voodoo magic suggestions already given. none of them work.
     
  17. Dev_WeAR-Studio

    Dev_WeAR-Studio

    Joined:
    Nov 26, 2015
    Posts:
    3
    I have tried all of variants and i find solution for me. I just open another project and build that. After this, I opened my problem project and this solved my problem )))
     
  18. prajithshrimans

    prajithshrimans

    Joined:
    May 30, 2018
    Posts:
    1
    I have these errors While Building!

    Please solve this problem as soon as possible



    1.
    Build completed with a result of 'Failed'
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

    2.
    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:182
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:89
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    UNITYError1.PNG unityerrorlist.PNG
     
  19. xCharrx

    xCharrx

    Joined:
    Nov 13, 2016
    Posts:
    1
    Same problem as the person above. Please help this is the second time I've had to deal with building errors -first time was entirely my fault- and they are getting to be really annoying. Also I'm using Unity 2018.2.16.
     

    Attached Files: