- Home /
How do I resolve the "Error building Player: ArgumentException: An empty file name is not valid." error?
Hey guys,
I'm having some trouble building to Android from my mac book air. I downloaded the SDK and when I try to build, at some time during the process after building the scenes it asks me for the SDK root directory. I browse to it and select it and immediately after I get this error: "Error building Player: ArgumentException: An empty file name is not valid.".
I tried setting the path in preferences too but it still always brings up a window and asks me for the SDK location anyway.
Two of my friends that are working on the same project are able to build just fine and the settings on mine (platform, player settings, etc) match theirs exactly. One of my friends got a Java install popup the first time he tried, but once he installed it, it worked fine. I didn't even get the popup and even though I manually installed Java it didn't help.
I googled the message and checked out a couple posts with similar issues. One said something about making sure I have no iOS specific plugins (which I don't have) and another mentioned installing Java (which I did already). I've even tried doing a fresh checkout of the project and uninstalled/reinstalled Unity with no success.
I need to get this resolved, any help is appreciated.
Thanks
Unfortunately no :(
I did just upgrade to unity 4 though (was using 3.7 up until now), so I'm going to try again and see if t works. Do you have any suggestions?
hopefully this simple, you do not have the platforms/packages installed?
http://developer.android.com/sdk/installing/adding-packages.html
basically run ] ./android sdk in Termainal on your $$anonymous$$ac
So I get the exact same error even in Unity 4. I'm currently installing all the packages in the sdk manager and will try again although I doubt it has anything to do with my issue since my friend is able to build just fine and he's using the same version of Unity and working on the exact same project. The only difference is that he's using a macbook pro and I have an air.
Answer by dreamychris · May 27, 2013 at 05:27 AM
I solved this on my Mac by manually upgrading to the most recent version of Java supplied by Apple. I suspect it was the act of reinstalling that fixed it, rather than anything to do with the latest version, since Android builds used to work on that Mac (they abruptly stopped working for no discernable reason).
As of this writing, the latest version of is Java for OS X 2013-003. Make sure you always install the latest version, as major security holes are found regularly in Java.
Your answer
![](https://koobas.hobune.stream/wayback/20220613093609im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Invalid Android NDK Directory 2 Answers
Compiling Android game doesn't work out 0 Answers
Android IL2CPP error in Unity 0 Answers
failed to re-package resources after importing facebook-unity-sdk-7.6.0 0 Answers
trouble with locating android SDK 1 Answer