Errors during Building

Error 1 error : System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\Users\Andy\Downloads\Unreal Engine 4 - Source Code Zip Files\Unreal Engine 4\UnrealEngine-4.0\Engine\Intermediate\ProjectFiles\EXEC UE4

and

Error 2 error MSB3073: The command “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 UE4

Any idea on how to fix these? Also, when trying to copy everything over from the .rar files I get a few files that wont copy over because their “fThe specified path, file name, or both are too long.” How to fix that too ?

It looks like your maybe building from your downloads folder. There is a video that shows how to compile the code, but move it all to a folder closer to the root drive, like C:\Unreal\ or something like that.

This completely solved the building errors, much appreciated.

helped me to solve the error and to package by :

  1. -placing UE project file into C:\ directly

  2. -packaging output also into C:\ directly

like also referred here

For the

PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

If one has Firebase plugins installed, deleting the following folders did the trick for me:

C:\Users\Name\Documents\Unreal Projects\eHBB\Intermediate\Android\APK\gradle\app\build\intermediates\transforms\FirebasePerformancePlugin\release\folders

C:\Users\Name\Documents\Unreal Projects\eHBB\Intermediate\Android\APK\gradle\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\folders

These have number folders inside them, like “1”.
These debug and release folders get rebuild once one builds again. Hope that helps someone.