Preprocessor directives not working on device

Hello, my code

#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
//some code
#elif UNITY_EDITOR
//some code
#endif

this code running on editor but i build and install my android device, code is not working

where can i make mistakes

That looks ok to me, might be worth changing it to something like this and then you can check it’s working in the editor itself when you do a build:

#if (UNITY_ANDROID||UNITY_IPHONE) && !UNITY_EDITOR
bad code <---- this should cause a build error when you try to do a build
#endif

p.s. I had a problem with #elif on Unity 4.6 although it was ok on Unity 5.0 - might be worth rearranging your code to not use #elif as a test