Error CS0234: The type or namespace name `IActiveBuildTargetChanged' does not exist in the namespace `UnityEditor.Build'. Even after moving Editor folder.

Hi,

I was searching for this error and I found this answer but it is not working.
I moved Editor folder from StandardAssets/CrossPlatformInput/Scripts to StandardAssets folder and it is still throwing this error. I tried to put this folder in every single other folder but it is still not working.
Should I put ALL scrips in Editor folder?

I’m using Unity 5.6.2 on WIndows, and I imported whole CrossPlatformInput package and also couple of other standard packages.

I’m having the same issues. One guy apparently found a temp fix, I would comment out instead of deleting the lines though: error CS0234: The type or namespace name `IActiveBuildTargetChanged - Questions & Answers - Unity Discussions

The error may be due to the fact that you have not imported some of the “Standard Assets” folders, or you have deleted them or moved them from the right place unintentionally.
Try importing the folders: CrossPlatformInput, Editor and Utility.
Look at this answer:

In my case it was because I created “Asset Assembly Definition” for Asset Store stuff, to check if the project recompiled faster (I was not succesful… :<).
If you have done so, go to every “Assembly Definition” file and check the checkbox:
“No Engine References” on top of inspector section “General”.

It worked for me and by now I manged to get it working on Android device.

Make sure all your related code (including the IActiveBuildTargetChanged reference) is inside a UNITY_EDITOR directive :

#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Build;

public class YourClass : IActiveBuildTargetChanged
{
    //Your code
}
#endif