Search Issue Tracker
Fixed in 2018.3.X
Fixed in 2017.4.X, 2018.2.X
Votes
80
Found in
Issue ID
956425
Regression
No
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: https://issuetracker.unity3d.com/issues/android-build-fails-when-the-latest-android-sdk-tools-25-dot-3-1-version-is-used
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
Comments (88)
-
Ricachet
Sep 13, 2018 14:21
As of 9/12 Unity will tell you to download JDK 8 if you try to use 10. Thanks for this warning :)
-
Pranay1Knight
Jul 23, 2018 19:07
Thank you problem solved, It's working.
-
Thiago-Paiola
Jul 23, 2018 08:47
My solution was uninstalling Java 10 and reinstalling Java 8 on Windows 10.
-
jl008
Apr 23, 2018 13:36
Unity version: 2017.4.1f1
JDK version: 10.0.1Error:
Failed to compile resources with the following parameters:
-bootclasspath "C:/apps/android-sdk\platforms\android-27\android.jar" -d "C:\temp\DemoAppUnity_6.7.8\DemoApp\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\Company\ProductName\R.java" "com\vj\isdemo\R.java" "com\vj\isdemo\resources\R.java"
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings -
grrrrrrg69
Apr 16, 2018 03:52
ps. Unity 5.3.4f1 (64-bit)
-
Zuicis
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.1f1Java: jdk1.8.0_144 - works
Java: jdk1.8.0_151 - works
Java: jdk1.8.0_162 - worksJava: jdk-9.0.4 - failed to compile resources...
Java: jdk-10 - failed to compile resources... -
Bhanu3D
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,
Bhanu -
Pickles12321
Mar 03, 2018 19:19
Same Problem. Even today's android SDK tools update didn't help. Please fix.
-
D3ntrax
Feb 26, 2018 18:05
Same problem.
-
pesahov
Feb 20, 2018 16:37
Java 8 + Tools 26.1.1 version working on Unity 2017.3.p1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Yury-Habets
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: https://forum.unity.com/threads/java-9-jdk-9-support-by-unity-android.499354/