- Home /
compiler errors when building for android
This is the first time I have built this project for my phone, and im getting the following errors during the first stage of the build.
Everything is set up correctly to produce the app for android and I can test the game in unity without any problems
Have you checked that you're not calling any unity functions when initialising fields?
If i did, I wouldnt know it.... So what am I looking for?
the script mentioned in the 5th error is not used in the build
What about the 5th error ? Can you please check if there is a OnGUI() function in this script ? If yes, then what do you do in it ? Have you checked you didn't do anything in the background which should NOT be in background thread ?
I've never done anything with the background(assu$$anonymous$$g that's a variable of some type), and yes, it has the OnGUI function
Answer by NeverHopeless · Jan 28, 2015 at 10:25 PM
As you said in a comment that the error is on UnityEditor
import and the code runs fine on unity but the problem is with the platform other than unity editor so my guess is that you need platform dependent compilation. Since AFAIK unity editor is not available for builds.
I have also faced UnityEditor
issue (not exactly similar to this one) when tried to use a unity alert for Android and iOS devices.
Hopefully, after defining an equivalent functionality for your devices, to not use, UnityEditor namespace will fix the issue.
Answer by tanoshimi · Jan 28, 2015 at 08:21 PM
The 4th and 5th errors look relatively explicit and easy to solve (though it's hard to be certain as we can't see the full text).
You're calling GUI.xxx from somewhere other than in OnGUI()
There's an error on line 4 of masterServerNetwork.cs
The line that the error is on is a using directive.
using UnityEditor;
Your answer
Follow this Question
Related Questions
Store/Stack Items 0 Answers
Button as a child of a button 0 Answers
Multi Touch Disable on Virtual Joy-pad (FPS) 0 Answers
Touch Input with Event Trigger. How to handle with it properly. 0 Answers
UIText not updating on Android build 0 Answers