Probably stupid simple - Unable to build android apps

Hi all,
I’m sure this is a stupidly simple issue that’s going to make me look like a total noob (which I am), but I don’t seem to be able to build android apps at all. This problem seems to occur on both the Windows and Mac versions of Unity 5.6.0f3.

I have the latest versions of both the Android SDK and JDK installed on both machines, but keep getting the below error when I try to build:

Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -Xmx2048M“/Users/Bennage/Library/Android/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -

What am I missing? If I point Unity at the latest JDK (8.0_121) then I get the error: “Invalid JDK home selected”

If I download the older 7.0_80, it seems to accept it, but then fails to build with the above error.

Any advice much appreciated. Sorry if this is simple to fix, but I’ve tried searching for answers everywhere with no luck.


Make sure you have the latest JDK installed and make sure your JDK_HOME and JAVA_HOME environment variables are set. Here is a guide for setting up the environment variables.

I had already done that. However I found the solution elsewhere.

I replaced the ‘tools’ folder in the SDK with the tools in “tools_r25.2.3-[OSX/WINDOWS/” at the bottom of this website:

All sorted now. Thanks anyway!