I collect a signed apk on android that gives: enter image description here

  • You first fix the error in the TreeUtils script. Make sure that only incomprehensible mistakes remain, and then incomprehensible mistakes are possible - vmchar
  • and the errors that you have displayed in the console are better off with text, they are hard to see or hardly seen in the picture - vmchar 7:18 pm
  • So there is no error in the player to compile everything. Namespace using UnityEditorInternal in visual studio sees - Madoka Magica
  • what it sees in VS does not mean that you can use it in the build. Unity tells you that you will not be able to use it in the build. This namespace is available only in the editor - vmchar
  • So what should I do about it? - Madoka Magica

1 answer 1

The error indicated in the title of the question

UnityEditor.BuildPlayerWindow + BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer

is not independent and speaking, and means that Unity cannot build a package for your application, due to errors that occurred during the compilation of your project. Therefore, before you tackle this incomprehensible error, look in the Unity console and correct more understandable errors.

For example, in your case there is an error:

Assets / Marble Space / Scripts / UI / TreeViewUtils.cs (10,16): error CS0246: The type or namespace name 'UnityEngineInternal' could not be found. Are you missing assembly reference?

This error indicates that in one of the scripts you use the UnityEngineInternal namespace. This namespace is valid for use in the editor and Visual Studio or any other IDE will not show errors, but it cannot be used in the final assembly. Most likely, when you correct this error, the rest will also be corrected, if there are no other obvious errors.