- Home /
I have a problem with JAVA_HOME. It says its set to C:\Program Files\Java\jdk-10.0.1\bin but i have changed it pls help
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk-10.0.1\bin
Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
My JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_171\bin
Answer by IgorAherne · Jun 22, 2020 at 12:51 PM
It is a Unity bug. To fix: https://stackoverflow.com/questions/56722286/how-to-fix-java-home-environment-references-a-directory-in-unity3d
Answer by AtomicStudiosDev · Aug 02, 2018 at 07:16 PM
If you haven't already solved the issue, the JAVA_HOME variable should be set to the main folder, before bin. For example: C:\Program Files\Java\jdk1.8.0_171
Answer by Nichathan · Apr 03 at 02:53 AM
Funny thing. Going (in Unity) Edit->Preferences->External Tools->Android then selecting Android SDK Tools Installed with Unity (recommended) = true fixed my issue.
I also read that for users that had this issue while it was set to true had fixed the issue by reinstalling their Unity or deselecting it and manually navigating to their SDK tools.
Your answer
Follow this Question
Related Questions
Java error when building 1 Answer
How do I solve CommandInvokeFailure? 2 Answers
unable convert classes into dex format 0 Answers
Admob Build Error ? 0 Answers
How to build windows 8.1 phone game in unity 3d 5.3 ? 0 Answers