JDK, Android NDK and SDK download

Hello,

I have to find and install the JDK and Androids SDK and NDK separately from Unity as I have had issues installing editors via the Hub and my Editor installs do not have the modify option.

I went to the Android website and downloaded the SDK and NDK command-tools, but Unity couldn’t find the file it needed. The JDK I installed from OpenJDK was the latest release, but Unity said it was the wrong one.

Could someone please send me a link, or tell me what it is I need to download to get these installed so I can build for Android?

Thank you :slight_smile:

1 Like

You can find NDK/JDK versions here - Unity - Manual: Android environment setup

2 Likes

Hello,

Thank you for your reply.
Unfortunately I’m still not managing to find the files that I need to download. I’ve tried several JDK downloads from their website and I’ve installed the NDK(SidebySide) component on the Android Studio app (the only available NDK), but so far the only thing I’ve successfully installed in the SDK.

Any chance you could send me the links to the specific things I need to download please?

It depends on unity version you’re targeting

I have 2021.3.15f1

NDK is here - https://dl.google.com/android/repository/android-ndk-r21d-windows-x86_64.zip
SDK consists of multiple components:

As for JDK, one of these should work - Java Archive Downloads - Java SE 8. There’s no publicly available OpenJDK link which Unity uses.

2 Likes

You are a life saver! Thank you so much!

Hello, how did you manage to install all of the files above? It’s been a week and I gave up but I randomly found that We had the exact same issue so this probably could solve mine

Hello!
The SDK I got from downloading the Android Studio app, the SDK seemed to come with it: https://developer.android.com/studio (didn’t need to use it, just installing it worked)
The NDK I used the link Tomas sent: https://dl.google.com/android/repository/android-ndk-r21d-windows-x86_64.zip
and the JDK link https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html will give you a list for each PC type, you’ll need to create an Oracle account to download it.

But that all worked for me! I unzipped the folders into my C drive where the Hub is, just to keep them together. Unity found the SDK automatically but I had to choose the root folder of the JDK and NDK for it to find them.

I hope it helps! :slight_smile:

My unity version is “2022.1.20f1” and what is the sdk ndk and jdk version. And how do I know what version Unity support sdk jdk and ndk versions?

Hello. I think this is what you are looking for. Go to the site and scroll down a bit.
You can find NDK/JDK versions here - https://docs.unity3d.com/2023.1/Documentation/Manual/android-sdksetup.html

hey, may I ask how you managed to get the direct links? was it from the modules.json file from UnityHub-installed versions ?

  • about the modules.json, a direct file like this one would be so much appreciated! can you pass this on to the Unity team please?
1 Like

You can locate these paths in HUB logs when you’re trying to install Unity

1 Like

@Tomas1856 Can we please get a more discoverable public download link for these android components? Preferably a torrent that can be linked with the editor torrent from the download archives? Ideally, there should just be a link to the download sites in the editor that can grab the associated files if they aren’t detected.

I consistently have an absolute hell of a time trying to get Unity HUB to properly install any of it. This past weekend was spent between constant download failures and then having HUB get stuck after the editor install, which ended up forcing me to quit after 2-3 HOURS of letting my CPU sit at close to 100% while the HUB tried to act like it was finishing the editor install even though all files were installed and the editor installer was finished and long since gone from task manager. I finally had to force quit HUB, which then bailed on the rest of the components and made me manually find and install them from the %USER%/AppData/Local/Temp folders. Of course then I had to figure out exactly where each of the zips went and even then it was missing cmdline-tools and build-tools, which I had to copy over from android studio before I finally got an android apk built. To say that process was infuriating would be putting it mildly.

The little gear widget to install components has never ever worked for me. All I ever see is Remove from Hub and Show in Explorer options. The only time I ever get a chance to add components to installs is if I happen to select them on initial download.

All of these issues have plagued HUB on my system for years, which is why I now just download the torrents from the archives, but then you have to try and use android studio to link to the proper files and correct versions, which is always a whole other batch of fun. That’s how I ended up trying HUB installs again over the weekend and losing most of my weekend to attempting to get an APK built.

I did finally get it built, but I never want to touch any part of that whole chain now. I will just attempt to stick with this version and pipeline until 2023+ lands and I have to move to a new LTS.

1 Like

Sorry to hear that.

Could you submit your feedback here - https://unity.com/roadmap/unity-hub

“Submit a new idea
Feature Request”

The download and installation routines are handled solely by the HUB team, and they don’t monitor this section of the forum.

1 Like

ah thanks I didn’t know that. ( I noticed I’d forgot to set hyperlink to my previous comment, now I edited it and fixed it; it’s pointing to a modules.json file from an open source project. the modules.json file ONLY exists in unity editors installed from hub, which I think doesn’t make much sense to not include in manually installed ones)

1 Like

How do I add jdk to unity?

hello i am using a unity version 2022.3.0f1 i get error when i download this version of editor from the unity hub but i cant able to setup the Android JDK,SDK,NDK for this version eventhough i completed my project unfortunatly by this issue i cant able to build and this is my first project in unity please help… i am waiting for u r replay

What error do you get when downloading via HUB, are you using latest HUB version - 3.6.1?

i found same bug and i also use latest HUB