Search Issue Tracker

Fixed in 2018.3

Fixed in 2017.4, 2018.2



Found in

Issue ID




Android builds fail with Java 9 JDK and Unable to list target platforms error



With the latest public versions of Unity (2017.1.1f1), Android Studio/SDK tools(26.0.2), and JDK (Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode), Android builds failed early on with:

Error:Invalid command android
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct.
See the Console for more details. Error building Player: CommandInvokationFailure: Unable to list
target platforms. Please make sure the android sdk path is correct. See the Console for more details.

A similar problem (same error message, but different cause) has been reported about 6 months ago:

In my case, downgrading to JDK 8 fixed the problem.

Reproduced with:
2017.3.0b4, 2017.2.0f3, 2017.1.2f1, 5.6.3p4, 5.5.5f1

  1. Response avatar


    May 18, 2018

    Unfortunately there are compatibility issues between JDK9 and JDK10 and Android SDK.
    The bugs have been reported to Google, we are working on a full-featured fix.
    As a workaround, for now please UNINSTALL JDK9/10 and INSTALL only JDK8 (64-bit).
    We apologize for the inconvenience caused.

    Feel free to check the status at the forums as well:

Comments (31)

  1. 999671153d8b9b3d9cb4502d21ae4667?d=mm


    Apr 12, 2018 13:49

    OS WIN10
    Android sdk build tools - latest by unity target (27) (installed versions on android studio: 26.0.0 - 28.0.0-rc1)
    Unity version: 2017.4.1f1

    Java: jdk1.8.0_144 - works
    Java: jdk1.8.0_151 - works
    Java: jdk1.8.0_162 - works

    Java: jdk-9.0.4 - failed to compile resources...
    Java: jdk-10 - failed to compile resources...

  2. 06ada52c5cd40ff3b0e9c7ab28734322?d=mm


    Mar 19, 2018 10:46

    Hi Friends,

    The Java version I am using is jdk1.8.0_161. Is this the right one? I am getting Gradle Build Failed : unable to find Build Tools 28.0.0 error. Please help

    Thanks & Regards,

  3. 47ddb3fda3598eaf5236e69ad62b33c5?d=mm


    Mar 03, 2018 19:19

    Same Problem. Even today's android SDK tools update didn't help. Please fix.

  4. 70a9032842a4221d9dcdf6c3d06a4dcd?d=mm


    Feb 26, 2018 18:05

    Same problem.

  5. D1738665e6a05b68159d278c89807267?d=mm


    Feb 20, 2018 16:37

    Java 8 + Tools 26.1.1 version working on Unity 2017.3.p1

  6. 2f1e47f42a23fb778d1a9eec84fc0c36?d=mm


    Feb 19, 2018 23:26

    Experiencing same problem after computer rebuild: downloaded latest Android Studio and latest Unity and latest Java JDK. . Temporary fix was revert to Java JDK 8u161 and revert tools using link at

  7. Bc9003da95d3e45aa9b9d7b941102b19?d=mm


    Jan 15, 2018 17:42

    Same problem, same error message, it's not possible to create a build. I have only managed to solve this by downgrading JDK to 8u151 and also the android SDK (r25.2.5 - replacing "tools" folder). I would be really grateful if the developers could fix this, it's been a pain in the ass for a long time.

  8. 1932242bdd892819ef21d87693f149e9?d=mm


    Jan 14, 2018 15:51

    My unity can't find the newest sdk folder, Fix please.

  9. 6ca45dd46b5c60e1f83f900fdb010206?d=mm


    Jan 10, 2018 17:49

    Cbarnes_Bnea, Thank you so much for pointing this. Had already set the path to JDK8, but never thought that just having JDK9 will cause the error! Deleting JDK9 from the JavaVirtualMachines folder solves it!

  10. 2093c89f135a046310d51ea832e34991?d=mm


    Jan 05, 2018 02:53

    Hello, in this video i explain how to resolve this problem

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.