I am now creating a keystore for my game (in unity) but when I press the add key button, an error pops up
Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Preferences -> External Tools UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
I installed the JDK and checked the path of it in the terminal using the command /usr/libexec/java_home
, then it shows me that the path of the JDK is /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home
.
I copy and paste it in the JDK path in unity but the error still pops up. I actually checked the JavaVirtualMachines in my computer's library but there's nothing in it.
How can I solve this problem? Any help is greatly appreciated.
Navigate to File > Project Structure > SDK Location. Upon navigating there you will find that a tab named “JDK Location”, select that and then you can set the JDK path for the current project on which you're working.
Actually I solve this problem by adding the modules (Android SDK & NDK Tools, OpenJDK) to my Unity Editor. Actually if you tick the Android build support module, it won't automatically help you to tick the two modules above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With