- Home /
Android build failing 2020.3.25f1
I can run my application in the editor with no problem but when I try to build to Android, I get the following error between 3-9 times.
Destroy may not be called from edit mode! Use DestroyImmediate instead. Destroying an object in edit mode destroys it permanently.
When I click it the only additional information I get is the following Destroy may not be called from edit mode! Use DestroyImmediate instead. Destroying an object in edit mode destroys it permanently. UnityEngine.UI.Image:OnDisable ()
The other output is as follows: Build completed with a result of 'Failed' in 14 seconds (14445 ms) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
&&
UnityEditor.BuildPlayerWindow+BuildMethodException: 6 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in :0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0 UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
I am not calling destroy in any of my functions for editor and I have the editor calls wrapped in #if USING_EDITOR
I'm really lost on this and can't seem to get past a simple build. This issue occurred suddenly with no change to any code or scene. I pulled a new branch from version control where I know the application was running.
Any clues would be awesome. INB4: Restart Unity, Try a new version, reinstall Unity, check build settings.
Answer by omanuke · Jan 31 at 07:47 AM
I'm encountering same issue. This issues occurs on 2020.3.4f1. Recently, I changed Mac from 32G Max to 64G Max. I could build same project on 32G Max but I couldn't on 64G Max. Already I returned old 32G Max, so I can't check I can build or not on 32G Max.
Your answer
![](https://koobas.hobune.stream/wayback/20220613051625im_/https://answers.unity.com/themes/thub/images/avi.jpg)