Project scripts stop working after building it in Android

Every time I change my build settings in Unity, from PC to Android, all of my project’s scripts stop working. Why does this happen, and what do I have to do to get it to work in the Android build?

Because of lazytyping. Mobile devices does not support some codings like:

var class : ClassName = class.GetComponent(ClassName); // Wrong using
var class : ClassName = class.GetComponent<ClassName>(); // Instead of must be

While on StandAlone platform, try to use “#Pragma Strict” at the top of scripts.