Unity Build Error `DirectoryNotFoundException`

2020-07-11 05:47发布

Guys why I can't build my project why this error? Is wondershare related to Unity? Why I am having this error when I want to build my application on my android device? Any help would appreciated Error.

2条回答
啃猪蹄的小仙女
2楼-- · 2020-07-11 06:34

For some reason, I thought it a good idea to change your %TEMP% environment variable, which is used when building in Unity.

To change it, search for "System": -"advanced system settings" -Environment Variables -System variables -TMPDIR: change from wondershare to existing dir. default is: "%USERPROFILE%\Appdata\Local\Temp"

To verify the path is correct you can open run with "Win+R" and type "%TEMP%". This should open the new TMPDIR.

You might have to restart your PC after this.

查看更多
Fickle 薄情
3楼-- · 2020-07-11 06:36

According to the error message, it looks like Unity's build pipeline is trying to create a temporary file with a random name inside a folder which does not exist.

It is most probable that some information is being cached in build.gradle or other parts of the project.

  • Close Unity

  • Delete Library and Temp folders

  • Open Unity


Afterwards, If you ran into an access denied error, restart your PC.

查看更多
登录 后发表回答