UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()
I had the same error and I avoided it generating all lightmaps again (of each scene). I don’t know if this is the certain solution, but you can try it and see.
I additionally check details on the issue and it was due to one of the “aar” files in android. A contsnat declared in aar file R.string.myconstant was not found. I updated the aar file and it fixed the issue.