With the Unity Hub CLI,
In the headless help of the app, I can’t find the command to install OpenJDK for Android.
Doesn’t work with “-m openjdk” logic.
Also, the command “-m standardassets” seems broken.
Hi guys, I found the solution. Just like @jamiebrynes kinda said, the OpenJDK doesn’t automatically install even when installing the Android Build Support. In my case, I discovered the circled checkbox wasn’t check. This window appears in Unity Hub>Installs>(Right-click on the desired version)>Add Modules. You just need to toggle the checkbox and click “Done”.
I still have the problem !!?? It tries to install and after a while nothing happens and the check box is unchecked and also in the preferences it says “JDK not installed” ??
Thank You !!
Grr. After searching online, and going back to the Java website searching for answers, I stumbled upon this:
It seems those of us who are having trouble downloading the JDK might be in the unauthorized countries. I downloaded JDK 14 just fine, but Unity rejected it, and requested JDK 8, which is how I found this charming notice.
Searched a bit more, and found this post on stackOverflow. You can follow the links and download Amazon Correto JDK 8. I downloaded, and installed it to the recommended directory (not unity; something like c:\program file\Amazon Coretto). I restarted my project from Unity Hub, and in Edit → Preferences → JDK, it had already automatically detected the presence of JDK 8. I just accepted it, and built my game.
Same problem just happaned to me yesterday when i updated Unity from 2019.2 to 2019.3, is there any solution to this problem ?
SOLVED :
I’ve found the solution of this problem, i think this is a bug from UnityHub, so the only way is to install openJDK 8 (1.8) manual, Here the steps i did :
Go Open Unity => Edit => Preferences => External Tools => Uncheck JDK Installed with Unity and click Browse => Go to this path “C:\Program Files\Java\jdk1.8.0_251”.
Hi previous answer almost work for me, still had some issue, but this helped me:
Download newest sdk 8 (for this moment sdk 8u251).
Install it
Go to the folder where it been installed.
There should be 2 folders jdk and jre.
Open jdk folder, copy everything from it and paste it in default unity jdk folder.
If you don’t know how to find path: open unity → Edit - > Preferences… → External Tools → JDK Installed with Unity (copy path).
I’m working on a cruise ship and our internet connection is over satellite. As such our exit node is in Dubai and often Google switch to the Arabic language as per IP address it sees it as the current location. So, this can explain the country issue (in my case). Still, this is annoying. At the moment, I don’t have any VPN subscriptions to this theory.
I know this is an old thread, but it’s one of the top results in search engines, so I thought I would share. I downloaded OpenJDK 64-bit for Windows from this website: Upstream | AdoptOpenJDK - Open source, prebuilt OpenJDK binaries. I just extracted it to c:\Java (it can be anywhere you want) and pointed Unity to it like others have suggested.
here what i use to install all child module “C:\Tools\UnityHub\Unity Hub\Unity Hub.exe” – --headless install --version %Version% -m android --cm -m webgl -c %changeset%