I am trying to build an APK in Unity 2019.4.39. Unity says that the build failed, but it does not tell me the files that caused the build to fail.
I can't fix the error because Unity does not tell which files or scripts are bad.
Can anyone please tell me how to figure out which files caused the build to fail ?
Here are the build errors:
Error building Player because scripts had compiler errors
UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts had compiler errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002b3] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
#0 GetStacktrace(int)
#1 DebugStringToFile(DebugStringToFileData const&)
#2 DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*)
#3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
#4 (Mono JIT Code) [BuildPlayerWindow.cs:964] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
Here is 1 image of the Unity console with the error message:
Note: I click on all 3 error messages, but still Unity does not show any filename that causes the build to fail.
PS: I know that there is an excellent answer to fix the build error "Error building Player because scripts had compiler errors" at this link on StackOverFlow:
Error when Building Project: Error building Player because scripts have compile errors in the editor
However, in my case, Unity does not even says which files are bad. So, I can't fix the error if I don't know which files cause errors.