How do I resolve "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

From the list of causes, mine was needing Java 1.6 (1.7 did not work) on OS X.
I downloaded it from Download Java for OS X 2017-001
Beware not to use it for anything else (e.g. browsing) as 1.6 contains known vulnerabilities.