Hi guys,
I have a weird problem with Unity. Sometimes my android build fails with this:
Error building Player: 2 errors
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I said sometimes because the editor fails to create the apk 1 times every 5-6 times. I donāt know why. Sometimes it creates the build and sometimes it doesnāt. After a failed build if I try to build again it works.
The console says 2-3 errors but there no others informations. What are these errors?
Using Unity 2017.4 LTS + windows 10
(I had this problem since unity 2017.3)
This error is unrelated and a fix is going to appear in a later version.
āError building Player: 2 errorsā might mean, for example, that you have compilation errors in your scripts, which you have to fix before running on a device.
My scripts work fine in Standalone and Editor. For the moment I will believe that restarting unity will fix this problem. I doubt it. 2019.3.f. this was trying an UWP build with IL2CPP backend,and .NET 4.0
Build completed with a result of āFailedā
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
iāve been stuck with this problem suddenlyā¦even though it successfully ābuildā but cant even use the apk to publish. it says not a valid apk files.
Hi Guys if you guys havenāt find the solution I had the same problem so my solution was to remove all the irrelevant scripts that I did not need in my project since I added a prefab that was not mine.
(So I am making a marker base app using Vuforia and I needed a prefab from an ARCore based project and that came with some error [Build completed with a result of āFailedā UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)]
so to solve that I looked at all the ArCore scripte that I did not need{Like ARanchor, arcoreInterface and so onā¦} and I deleted them My project worked just fine after that)